About instant snapshots


An instant snapshot is an in-place backup of a disk that can be used to rapidly create a new disk in minutes.

Instant snapshots capture data at a specific point in time. They are optimized for rapidly restoring captured data to a new disk. Use instant snapshots to quickly recover data in cases where the zone and disk are still intact but the data on the disk has been lost or corrupted, such as the following:

  • User error
  • Failed software upgrades
  • Application-level failures

Creating an instant snapshot of a disk before one of these events occurs allows you to quickly restore the data from the instant snapshot to a new disk. Reducing the time to restore a disk helps avoid downtime and long maintenance windows.

Instant snapshots are incremental and can be more cost effective than using multiple disk clones.

Snapshot types

You can backup a Persistent Disk with snapshots. The 3 types of snapshots—standard, instant, and archive—all capture the contents of a disk at a specific point-in-time.

The two key differences between the snapshot types are the data recovery time (RTO) and storage location.

Data recovery time

The data recovery time is the length of time needed to create a new disk from a snapshot and varies by snapshot type.

  • Instant snapshots offer the lowest and best recovery times.
  • Standard snapshots have faster data recovery times than archive snapshots.
  • Archive snapshots have the longest data recovery times, but offer the most cost efficient storage.

Storage location by snapshot type

The storage location is the zone or region where Compute Engine stores the snapshot.

  • Instant snapshots are local disk backups that are stored in the same zone or region as the source disk.
  • Archive and standard snapshots are remote backups of disk data stored separately from the source disk.

Compute Engine stores archive and standard snapshots in the same manner. Copies of archive and standard snapshots are stored across multiple locations with automatic checksums to ensure the integrity of your data.

Unless otherwise specified, references to standard snapshots include archive snapshots.

Snapshot type comparison

The following table compares the differences between the types of snapshots:

Snapshot type Best for Storage redundancy Support for Hyperdisk Can be created with snapshot schedules
Standard snapshots Geo-redundant data backup to safeguard against local, zonal, and regional outages. Redundant storage across multiple regions. Yes Yes
Archive snapshots Same as standard snapshots, but for data that is rarely accessed and must be retained for several months or years. Lower cost geo-redundant storage that is better suited for data related to compliance, audits, and cold-storage. Redundant storage across multiple regions. Yes No
Instant snapshots In-place data backup to enable quick restore to a new disk in case of user error or application corruption. Not redundant. Stored in the same zone or region as source disk only. No No

In addition to snapshots, Compute Engine offers other data backup options. Review the chart describing data backup options.

The information in this document applies to instant snapshots. Learn more about standard snapshots.

Supported disk types

You can back up both boot and non-boot disks with instant snapshots.

You can create an instant snapshot of a disk only if it's attached to a running VM in read-write mode.

Instant snapshots can be used with zonal and regional Persistent Disk. You can't use instant snapshots to back up Google Cloud Hyperdisk or Local solid-state-drives (SSD) disks.

An instant snapshot of a disk is always stored in the same zone or region as the disk. For example, instant snapshots of a Persistent Disk volume in the us-east1-d zone are stored in the us-east1-d zone. Likewise, instant snapshots of a regional Persistent Disk volume in the us-east1 region are stored in the us-east1 region.

Access the data on a snapshot

The data in snapshots is read-only. To access or modify the data on a snapshot, create a disk from the snapshot.

Create a disk clone if you want a writeable, immediately accessible copy of a disk for debugging or experimentation.

Work with instant snapshots

Store an instant snapshot in a different location

You can't directly move an instant snapshot to a different location, but you can create a standard snapshot from an instant snapshot and store the standard snapshot in the location that you want.

Limitations

  • You can create an instant snapshot of a disk only if the disk is attached to a running VM instance.

  • Read-only disks are not supported.

  • You can't select the storage location of an instant snapshot. It's always stored in the same region or zone as the source disk.

  • You can't delete a disk until you delete all the instant snapshots of the disk. This might also affect your ability to delete any VMs that the disk is attached to. If you configured the disk to be deleted when the VM is deleted, you have to take additional steps to delete the VM. For more information, see Error deleting a VM when an attached disk has instant snapshots.

  • An instant snapshot is accessible only within the zone or region where it's stored. To move an instant snapshot to another region, you must create a standard snapshot from the instant snapshot.

  • When you create a disk from a CMEK-encrypted instant snapshot, you must provide the instant snapshot's encryption key.

  • You can't create a VM from an instant snapshot of a boot disk. Create a disk from the instant snapshot first, and choose the disk as the source for the VM.

  • You can create an instant snapshot of a given disk at most once every 30 seconds.

  • You can't have more than 32 instant snapshots of the same disk.

  • There can be at most 21 days between the creation times of any two instant snapshots of the same disk.

  • You can't create instant snapshots with snapshot schedules.

  • You can't create instant snapshots of Hyperdisk volumes and Local solid-state-drives (SSD) disks.

  • You can't create instant snapshots on secondary asynchronously replicated Persistent Disk volumes.

  • Instant snapshots are crash consistent and not application consistent. This means that any in-memory data that hasn't yet been written to the disk isn't captured in the instant snapshot. If you require application consistency, create an application consistent standard snapshot.

  • You can't edit the data stored in an instant snapshot.

  • You can't recover deleted instant snapshots.

Billing for instant snapshots

The following costs apply to instant snapshots:

  • Operation costs: Applicable at creation time for each snapshot.
  • Storage costs: Charges apply based on how much data changes on the disk from the instant snapshot's creation until another instant snapshot is taken, or until the instant snapshot is deleted. The storage is billed at the same rate as the source disk.

How storage costs are calculated

Instant snapshots are billed based on the amount of data changed on the disk since the instant snapshot was taken.

The following is a summary of how costs are calculated:

  • After taking an instant snapshot, there is no additional storage cost until the data on the source disk changes.

  • For a given instant snapshot, storage costs increase as you write to the disk until you create another instant snapshot. Subsequent changes to the disk are billed to the newer snapshot.

  • Whenever a block on the disk is changed, charges accrue to the most recent instant snapshot of that disk. If other instant snapshots had tracked changes to the same blocks, charges for those blocks only apply to the newest instant snapshot.

Example

Suppose you create an instant snapshot, IS-1, of a disk at 9:00. At that time, the size of IS-1 is 0 bytes. For the next 90 minutes, you write data to the disk and create additional instant snapshots, IS-2 and IS-3, at 9:30 and 10:15, respectively.

The total costs at 10:30 are as follows:

  • Operation costs:

    • At 9:00 for IS-1.
    • At 9:30 for IS-2.
    • At 10:15 for IS-3.
  • Storage costs:

    • Charges apply to IS-1 for the bytes changed on the disk from 9:00 to 9:30.
    • Charges apply to IS-2 for the bytes changed on the disk from 9:30 to 10:15.
    • Charges apply to IS-3 for the bytes changed from 10:15 to 10:30.

Instant snapshot encryption

An instant snapshot uses the same encryption as its source disk. You can't encrypt an instant snapshot with a key that is different from the key used by the source disk.

Suppose you have a disk, D-1, that's encrypted with a customer-supplied encryption key (CSEK) or a customer-managed encryption key (CMEK).

If you create an instant snapshot, IS-1 from D1,IS-1 uses the same encryption keys as D-1. In addition, if you create a disk, D-2, from IS-1, D-2 also uses the same encryption keys as IS-1 and D-1.

When you create a disk from a CSEK- or CMEK-encrypted instant snapshot, you must provide the encryption keys for the source disk.

What's next