Snapshots
Snapshots capture a point-in-time copy of a disk. You can use them to back up data, restore a disk to a previous state, or provision new disks from an existing snapshot.
How snapshots work
A snapshot is a read-only copy of a disk taken at a specific moment. You can create a snapshot from any disk, including boot disks and data disks. The snapshot preserves the disk's data and restore size at the time of creation.
Snapshots are independent from their source disks—deleting a source disk doesn't delete its snapshots. However, if you create a new disk from a snapshot and the new disk is not attached to a VM, the source snapshot can't be deleted until that disk is deleted.
Zonal scope
Snapshots are zonal resources. Each snapshot exists in the same zone as the source disk it was created from. When you create a disk from a snapshot, the new disk is created in the same zone as the snapshot.
Restore size
Each snapshot has a restoreSize that reflects the size of the source disk at the time the snapshot was taken. When you create a new disk from a snapshot, the new disk must be at least this size. If you don't specify a size, the new disk uses the restoreSize by default.
Limitations
- You can create a snapshot while a disk is attached to a running VM, but there's a risk of data inconsistency if the guest OS is writing to the disk at the time of the snapshot. We recommend using
fsfreezeto quiesce the filesystem before creating a snapshot on a running VM. - There's no way to take snapshots of multiple disks on the same VM with gurantees the snapshots will be from the same time.
Next steps
- Learn how to create snapshots and create disks from snapshots
- Learn how to restore a VM from a snapshot
- Learn how to resize disks