Snapshots

Snapshots

A snapshot is a machine's disk at one moment. Taking one does not stop the machine. A snapshot stays in ix storage and bills as disk for the bytes it does not share with your other machines.

The call returns the snapshot id. A snapshot can be restored once its disk is confirmed replicated, and a restore of an earlier snapshot fails until then. Pass --wait-durable to the CLI, or call waitSnapshotReady in the SDK, to wait for that.

Restore a snapshot as many times as you like. Each restore is a new machine that boots from the snapshot's disk, and the original keeps running. The new machine shares the snapshot's bytes and writes its own changes beside them.

On images that boot systemd, each restored machine gets its own machine ID; everything else on the disk, SSH host keys included, is the original's.

snapshot.sh
ix snapshot create build --wait-durable   # prints the snapshot id
ix snapshot ls build
ix new <snapshot-id> --name copy

A restore does not honor --env, --ipv4, --group or --cpus. The new machine takes the original's shape.

esc
  • Loading