Jump to Content
Compute

Introducing scheduled snapshots for Compute Engine persistent disk

February 14, 2019
Sophia Yang

Product Manager, Cloud Asset Inventory

Ari Liberman

Product Manager, Google Compute Engine

From web hosting to databases, workloads running on Compute Engine need a reliable, convenient and automatic way to create periodic snapshots for disks of VM instances. We are excited to announce that starting today, scheduled snapshots are now available in beta. This feature lets you create automated snapshots, as well as manage snapshot retention. It is designed to reduce errors and save time, so you can focus on initiatives that create value for your business.

You can use this feature by first defining a snapshot schedule, which supports frequencies by hours, days and weeks. For example, you can create a schedule that says “Create a snapshot every six hours,” or “Create a snapshot every Monday, Wednesday and Friday of each week.” Scheduled snapshots also mean you no longer need to manage snapshot cleanup yourself. You can define the retention policy within the same schedule, and the system will automatically delete the snapshots based on your defined retention policy.

The snapshot schedule can be applied to a single disk, or multiple disks within the same region, so you can create scheduled snapshots at scale.

You can also use the latest storage location feature for snapshots when defining the snapshot schedules.

Using the scheduled snapshots feature

You can create scheduled snapshots via the API, in the CLI (gcloud) and through the GCP Developer Console. Here’s how to get started.

In this gcloud example, a snapshot schedule is created in the europe-west1 region to generate snapshots every six hours, then delete them after 15 days:

Loading...

and then attach the “hourly-schedule” to existing disk d1 in europe-west1-b zone:


Loading...

Or you can specify a snapshot schedule while creating a new disk.

You can also create and manage your automated snapshots using the Developer Console. As you can see in the screenshot below, simply go to your “Snapshots” tab in Compute Engine to create and manage your snapshot schedules in the “Snapshot schedules” tab.
https://storage.googleapis.com/gweb-cloudblog-publish/images/image2_1UYH4Xg.max-1000x1000.png

Here is an example of how the same schedule in the CLI above would look in the Developer Console, once you create a schedule through the “Create snapshot schedule” button on the top.

https://storage.googleapis.com/gweb-cloudblog-publish/images/image1_qJVfuEw.max-900x900.png

Navigate to the “Disks” tab to attach snapshot schedules to one or more disks. You can attach schedules to existing disks in the disk details view, or apply a schedule while creating a new disk. The screenshot below shows where to choose the snapshot schedule when creating a disk.

https://storage.googleapis.com/gweb-cloudblog-publish/images/image3_1RuV9Vu.max-1000x1000.png

To learn more about this feature and other best practices for managing your VMs, check out our talk from Next ’18. With the scheduled snapshots feature, you can focus on building creative applications without inventing your own tools for disk snapshots. Try it today.

Posted in