Snapshots are a key data protection and data availability feature of many cloud computing platforms, including Google Cloud. Snapshots are a central part of the Google Cloud Backup architecture—they allow you to create a point-in-time backup of a persistent disk attached to a virtual machine instance, and save it to Google Cloud Storage. You can also rapidly restore a snapshot to a persistent disk.
In this post, we explain how Google Cloud snapshots work and how to perform basic operations with snapshots, provide best practices that will help you make the most of Google Cloud snapshots, and show how NetApp Cloud Volumes ONTAP can help reduce snapshot storage costs and improve performance.
In this article, you will learn:
Google Cloud lets you take snapshots of persistent disks attached to your instances. A snapshot is an incremental copy of your data—the first snapshot contains all the data, while the next snapshots only save data blocks that changed in the interim. The difference between storage snapshots and backups is that snapshots are point-in-time copies of an entire disk while backups can contain individual files from multiple locations.
Source: Google Cloud Platform
Snapshots are stored in Google Cloud Storage. You can choose between two storage location options when saving a snapshot:
The following table explains how Google Cloud charges for network egress (data transfer), depending on the location option you select, and the region from which you retrieve the snapshot.
Retrieving snapshot from... |
Multi-Regional Location NW Egress Charge |
Regional Location NW Egress Charge |
The same region the snapshot is stored in | None | None |
A different region within the multi-regional location | No | $0.01 / GB |
Outside the multi-regional location | $0.01 / GB | $0.01 / GB |
Now that you understand where snapshots are located and how they are priced by Google, let’s discuss how to work with snapshots day-to-day.
There are two common ways to create a snapshot: you can create an ad-hoc snapshot at a certain point in time, or schedule to have a snapshot created automatically on a periodic pre-defined schedule.
You can create and schedule snapshots using the Google Cloud Console, the GCloud CLI, or the Google Cloud Platform API. Below we explain the process with the Google Cloud Console, for other methods and additional snapshot operations, see Google’s official documentation.
To create an ad-hoc snapshot for a persistent disk:
In Google Console, go to the Snapshots page and click Create Snapshot Schedule.To automatically backup persistent disks using a snapshot schedule:
Note: Each persistent disk can have up to one snapshot schedule attached to it, and a schedule can be used for up to 1000 disks. Snapshot schedules cannot be modified, and if you want to delete one, ensure it is not attached to any persistent disk.
Note: Google Cloud Platform provides two types of persistent disks—zonal and regional disks. A zonal disk only exists in one availability zone, while a regional disk is replicated across multiple zones in a Google region. When creating snapshots using the Google Console, the procedure is identical for both types of disks. However, when creating snapshots using the GCloud CLI or the API, the procedure may be different for zonal or regional disks - consult the documentation.
Follow these best practices to get the most out of Google Cloud snapshots, minimize errors and prevent data loss.
Google Cloud does not guarantee consistency for snapshots. There are several measures you can take to ensure a snapshot is consistent with the current state of your disk.
Restoring the same snapshot to a persistent disk multiple times is wasteful, because you can incur network costs every time you retrieve the snapshot data to the disk. To speed up the process and avoid network costs, restore the snapshot only once, and create a custom image of that VM with the persistent disk attached. You can then start VMs from this image, instead of having to restore data from the snapshot.
You can create snapshots more quickly by scheduling them for off-peak hours. Snapshot activity is busiest at the end of a business day in the relevant region and at midnight. Avoid selecting those times and try to schedule snapshots early in the morning or at a different time during the day. If possible, schedule snapshots on weekends.
Larger disks create larger snapshots. To ensure you are only snapshotting the data you really need to backup, split up data into several persistent disks.
It is a good idea to have one “boot disk” which only holds the operating system, applications and configuration. This boot disk won’t change so often, so its snapshot frequency can be lower. You can then have one or more “data disks” that store different categories of application data. You can set separate snapshot schedules for each of these disks, depending on how critical or time-sensitive your data is.
NetApp understands ONTAP better than anyone else, which is why the best backup solution for ONTAP systems is NetApp Cloud Backup. Designed by NetApp specifically for ONTAP, Cloud Backup automatically creates block-level incremental forever backups. These copies are stored in object format and preserve all ONTAP’s storage efficiencies. Your backups are 100X faster to create, easy to restore, and much more reliable than with any other solution.
Cloud Backup simplifies the entire backup process. It’s intuitive, quick to deploy, and managed from the same console as the rest of the NetApp cloud ecosystem. Whether you’re looking for a less expensive way to store your backups, a faster, more capable technology than NDMP, or an easy way to enable a 3-2-1 strategy, Cloud Backup offers the best backup solution for ONTAP.