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.

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 desired location.

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.

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

  • 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 25 instant snapshots of the same disk.

  • There can be at most 168 hours (7 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 has not yet been written to the disk will not be 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.

  • Encryption does not propagate from an instant snapshot that is encrypted with customer managed encryption keys (CMEK) to a disk that is created from that 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. If the source disk uses customer supplied encryption keys (CSEK) or customer managed encryption keys (CMEK), then the instant snapshot is encrypted with those keys.

For instant snapshots that have customer supplied encryption key (CSEK), the encryption key propagates to any disks that are created from that snapshot.

Encryption does not propagate from an instant snapshot encrypted with a customer managed encryption key (CMEK).

You can't encrypt an instant snapshot with a key that is different from the key used by the source disk.

What's next