GCP or Google Cloud platform offers many services to customers. One of the fundamental services in GCP is the GCE, or Compute Engine.

Compute Engine is the service that allows you to run and deploy your workloads through the IaaS approach. One of the key benefits of IaaS is the ease and flexibility of resource deployment and management.


Snapshots are an important part of the service. They allow you to easily capture the whole VM state before doing any modification… Before a while, there was no option to automate the snapshot creation process without using Google Cloud SDK or gcloud command line tools.

Usually the way we used to do that is by creating a cron job, or a scheduled task that will run gcloud command and then create the snapshot. More automation involved managing the snapshots retention period from inside the script we ran from that cron job or scheduled task.

A while ago a feature to automate the snapshots creation and management was finally created in GCP!

gcp gce snapshots


So the process is not much more simple than before. To give you a quick guide on how to setup the automatic snapshots schedule in GCP for Compute Engine VMs, check the steps below:

  • Create the snapshots schedule, by going into Compute Engine -> Snapshots -> Snapshots schedules tab, and fill the details as follows:
    • Schedule name
    • Region (where you want to store your snapshots)
    • The schedule frequency, whether hourly, daily, or weekly
    • The start time, and
    • The retention period (auto deletion after a period of time passes)
    • Once done, click Create
  • Then go to the instance that you want add to the schedule and find its boot disk, and go to its properties
  • Once inside the disk properties page, click edit, and then select the snapshot schedule that you have created previously…
  • Once done, select save and that’s it! Your instance will be backed up automatically based on the schedule you have defined!

Checkout my other blog posts here.

Check out my channel on Youtube and subscribe :-):

No responses yet

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: