About snapshot schedules for disks

Linux Windows

A snapshot schedule creates standard snapshots, which are geo-redundant diskbackups, at specified intervals. Use snapshot schedules asa best practice to backup your Compute Engine disks. You can use snapshotschedules to regularly and automatically back up zonal and regionalPersistent Disk volumes and Google Cloud Hyperdisk volumes.

Snapshot schedule properties

A snapshot schedule includes the following properties:

  • Schedule name
  • Schedule description
  • Snapshot frequency (hourly, daily, weekly)
  • Snapshot start time
  • Region where the snapshot schedule is available
  • Source disk deletion policy for handling auto-generated snapshotsif the source disk is deleted
  • Retention policy to define how long to keep snapshots that are generatedfrom the snapshot schedule

Snapshot schedule frequency

Note: You can't combine snapshot frequency options. For example,you can't create a snapshot schedule with both an hourly and a weekly schedule.

Before creating a snapshot schedule, choose a start time and a snapshotfrequency. The start time is when you want the snapshot schedule to begin.The frequency is defined as hourly, daily, or weekly.

A snapshot schedule begins within the hour of the specified start time.For example, if the scheduled start time is at 12:00, snapshotting startsanytime between 12:00 and 12:59. The schedule uses the UTC time standard.

Snapshot schedules are impacted by daylight savings time (DST) shifts.At the beginning and end of DST in the US, you might see the start times ofyour snapshot schedule jobs move forward or backward by an hour, respectively,regardless of whether your local timezone uses DST.

  • Setting an hourly schedule: To set up an hourly schedule, choose the starttime and choose a snapshot interval using an integer between 1 and 23. Asnapshot interval defines how often the snapshot is taken. When setting theinterval, choose a number that evenly divides 24 (1, 2, 3, 4, 6, 8, or 12) sothat the snapshot starts at the same time interval every day. For example,setting a start time of 9:00 with an interval of 6 indicates the snapshotschedule starts between 9:00 and 10:00 with a snapshot interval of every 6hours.

  • Setting a daily schedule: Set the frequency to daily for the snapshot tooccur once a day. For example, you can set a snapshot scheduleso that a snapshot is generated every day at 9:00.

  • Setting a weekly schedule: Set the frequency to weekly for snapshottingon one or more days every week. For example, a start time of9:00 PM with a weekly schedule set to Monday indicates thesnapshot schedule occurs at 9:00 PM on Monday every week.You can also set a weekly schedule that generates snapshots on differentdays of the week. For example, you might create a schedule for every week onMonday at 14:00 (2:00 PM) and Thursday at 10:00 AM.

Names for scheduled snapshots

Snapshots captured as a part of your snapshot schedule have automaticallygenerated names. The snapshot names are generated according to the followingpattern:

[disk-name-prefix]-[scope-name]-[timestamp]-[random-chars]
  • disk-name-prefix: The name of the source disk. This field can be up to 20characters.
  • scope-name: The name of the zone or region of the source disk.
  • timestamp: The UTC creation timestamp inYYYYMMDDHHMMSS format.
  • random-chars: Randomly generated alphanumeric characters to avoid namingconflicts with other snapshots.

Snapshot retention policy

You can specify how long Compute Engine retains the automatically createdsnapshots by setting a snapshot retention policy.

As a best practice, set up a retention policy to minimize snapshotstorage costs. If you don't set a retention policy, Compute Engineretains the snapshots indefinitely. You incur storage costs for those snapshots until youmanually delete them.

If you choose to set up a snapshot retention policy, you must do so when you createthe snapshot schedule.

If you don't set a retention policy, all your auto-generated snapshotswill be retained indefinitely. You will incur storage costs for these snapshotsuntil you delete them manually.

Automatic snapshot deletion

You can specify a maximum retention time period for your snapshot.The maximum retention time periodspecifies the maximum number of days for which Compute Engine retainsyour disk's snapshot after its creation. After the maximum retention time periodis over, Compute Engine attempts to automatically delete that disk snapshot.Note that Compute Engine completes the auto-deletion of that snapshotonly if you have a newer snapshot of the disk available. If you don't have anewer snapshot available, then Compute Engine continues to retain thatsnapshot until you create a newer snapshot.

For example, if you set its value as3, Compute Engine retains thesnapshot for a maximum of three days before attempting to delete it. After threedays, Compute Engine checks if there is a newer snapshot created foryour disk. If such a snapshot is available, Compute Engine automaticallydeletes your snapshot.

  • The snapshot retention policy applies only to automatic snapshots, not tothose you created manually.
  • You cannot apply a retention policy retroactively. If you create a snapshotschedule without a retention policy and then switch to a snapshot schedulewith a retention policy, the retention policy will only apply to thenew snapshots.
  • Regardless of the retention policy, you can always manually deleteautomatically generated and manual snapshots.
  • If you want Compute Engine to automatically delete your disk snapshotafter a specified maximum retention period, then you must have a newersnapshot created for that disk before the auto-deletion time.
  • If you set a maximum retention time for your disk snapshot, ensurethat you use a minimum value of 1 day.

Source disk deletion rule

When you create a snapshot schedule, you can also set a source diskdeletion rule. The source disk deletion rule controls what happens to yoursnapshots if the source disk is deleted. By default, if your source disk isdeleted, snapshots automatically generated from your snapshot schedule areretained permanently unless you delete them manually, regardless of the originalretention policy you set, unless you specify otherwise.

Alternatively, you can set the rule so that your snapshot retention policy isapplied to your snapshots if the source disk is deleted. For example, you mightapply a retention policy that keeps your snapshots for one week after the sourcedisk is deleted.

For example, assume you created a snapshot schedule with a retention policy of 3days but choose not to apply the retention policy on source disk deletion. Afteryou apply the policy to your Persistent Disk or Hyperdisk,Compute Engine automatically generates snapshots but will alsoautomatically delete snapshots after 3 days, per the retention policy. However,if you then delete the source disk, the retention policy no longer appliesand all existing snapshots that were created by this schedule are retainedindefinitely.

Note: If you detach a snapshot schedule from the source disk and then deletethe source disk, the original source disk deletion rule stillapplies to any snapshots that were generated from that schedule. A snapshotretention policy that specifiesautomatic deletion is applied to yourscheduled snapshots even after you detach the snapshot schedule from the sourcedisk.

Scheduling snapshots for Windows instances

If you are applying a snapshot schedule to disks that are attached toWindows VM instances, use theguest-flush option to enable VSS to generateshadow copies of your snapshots.For more information about snapshots for Windows, seeCreate a Windows application consistent disk snapshot.

Snapshot locality rules and snapshot labels

Similar to manually generated snapshots, you can also applyresource labels andselect thestorage locationfor auto-generated snapshots. If you set these in your snapshot schedule, anyauto-generated snapshots from this schedule will have these properties appliedto it. For example, if you set a snapshot locality asUS, all snapshotsgenerated from this schedule will be stored in the United States of America.SeeCreate a snapshot schedulefor examples on how to set these options.

Limitations for snapshot schedules

Snapshot schedules have the following limitations:

  • Snapshot schedules apply only in the project that they were created in.Snapshot schedules can't be used in other projects or organizations.
  • You can't createarchive snapshots orinstant snapshots using asnapshot schedule.
  • After you create a snapshot schedule, you can make changes to the description,schedule, retention policy, and labels. To update other values for a snapshotschedule, you must delete the snapshot schedule and create a new one.
  • For disks that use acustomer-supplied encryption key(CSEK), you can'tcreate snapshot schedules.
  • For disks that use acustomer-managed encryption key(CMEK), all snapshots created with a snapshot schedule areautomatically encrypted with the same key.
  • You can attach a maximum of 10snapshot schedules at a time to a Persistent Disk volume using the Google Cloud CLIor REST. On the Google Cloud console, you can attach onlyone snapshot schedule to a disk.
  • You can attach a snapshot schedule to a maximum of1000 disks.
  • You can create a maximum of 1000 in-use snapshotschedules per region.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.