Skip to content

Snapshots

Point-in-time copies of volumes, restoring them to new volumes, and launching an instance with a root volume restored from one.

Updated View as Markdown

A snapshot is a point-in-time copy of a volume, in the volume’s project. In the console, open Compute, then Snapshots, or a volume’s Snapshots tab.

Create a snapshot

In the console, choose Create snapshot on the Snapshots page or a volume’s page. With the API, call CreateSnapshot with volumeId and name. It answers 202 with a CreateSnapshot operation. From the CLI, ezgh compute snapshots create nightly --volume data. It, and the snapshot is creating, then available.

A volume can be snapshotted while it’s attached and the instance runs, without pausing it. Snapshots are crash-consistent: the whole volume at one instant, as if the instance had lost power then. For application-consistent snapshots, freeze the file system (fsfreeze) or stop the instance first.

A snapshot’s Stored (storageBytes, measured hourly) is the data only it holds; volumeSizeBytes and volumeType are the volume’s when it was taken.

Restore a snapshot

A restore makes a new volume; the snapshot stays.

  • Console: on the snapshot’s page, Restore to new volume, or Create volume with From a snapshot.
  • CLI: ezgh compute volumes create restored --snapshot nightly.
  • API: CreateVolume with source: { kind: "snapshot", snapshotId: "snp_…" }. It needs blockstore.snapshots.restore on the snapshot.

The new volume keeps the snapshot’s volume type (another volumeType is 400) and is at least the snapshot’s volume size; a larger size can be given. A snapshot still creating is 409 snapshot_not_ready.

Launch from a snapshot

To launch an instance whose root volume is restored from a snapshot, give rootVolume.snapshotId in CreateInstance and leave out image, or --root-snapshot in place of --image on ezgh compute instances launch (not in the console). See Instances.

Delete a snapshot

Delete, DeleteSnapshot or ezgh compute snapshots delete answers 202 with a DeleteSnapshot operation. Volumes restored from it are kept. Deleting a volume keeps its snapshots; a snapshot’s volume still names it.

Limits

At most 100 snapshots per volume, and the organization’s Snapshots quota in all; see Quotas and limits.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close