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 lets you 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 following are the key differences between the snapshot types:
- Retention after source disk deletion
- Data recovery time (RTO)
- Storage location
Retention after source disk deletion
An instant snapshot of a disk only exists until the source disk is deleted. Standard and archive snapshots aren't deleted with the source disk. Therefore, if you want to retain a backup of a disk after you delete the disk itself, use archive or standard snapshots.
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 | Deleted on source disk deletion |
---|---|---|---|---|---|
Standard snapshots | Geo-redundant data backup to safeguard against local, zonal, and regional outages. | Redundant storage across multiple regions. | Yes | Yes | No |
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 | 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 | Yes |
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.
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
To verify, view, or modify the data on a snapshot, create a disk from the snapshot. After you create the disk, you can attach it to a VM or create a new VM from the disk, if it is a boot disk.
If you no longer need an instant snapshot, delete the snapshot to reduce your storage costs.
You can list all the instant snapshots in a project, or only list the instant snapshots of a disk.
For a given disk, there are limitations regarding the maximum number of instant snapshots and maximum time between 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't select the storage location of an instant snapshot. It's always stored in the same region or zone as the source disk.
When you delete a disk, all instant snapshots of the disk are deleted. This means that when you delete a VM, instant snapshots of the VM's boot disk are deleted. Instant snapshots of non-boot disks attached to the VM are also deleted if you've enabled auto-delete for the disk. To retain the data on an instant snapshot before it is deleted, create a standard snapshot from the instant snapshot.
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.
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 move a disk until you delete all the instant snapshots of the disk. For more information, see Moving a disk that has instant snapshots.
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
.
- At 9:00 for
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.
- Charges apply to
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
- Learn about working with instant snapshots.
- Back up a disk for disaster recovery with standard snapshots.
- Learn how to copy an instant snapshot to a standard snapshot.