Creating scheduled snapshots (with screenshots) | Google Cloud

To ensure your Google Cloud VM Instance data’s safety, you should snapshots (backup) your VM regularly. Early this year (2019) Google Cloud Announced a feature which can automate your snapshots, it’s called Snapshots schedule.

So, In this tutorial, you will  learn how to create a Snapshots schedule for persistent disk.

As you know that Snapshots are incremental on Google cloud Platform. It means, Only the first snapshot will contain all the data on the persistent disk. If you create a second snapshot that snapshot only contains any new data or modified data since the first snapshot. And Snapshot 3 contains any new or changed data since snapshot 2.

When you delete a snapshot, Compute Engine immediately marks the snapshot as DELETED in the system. If that snapshot has no dependent snapshots, then it deleted outright. But if it has dependent snapshots then the data automatically get transfer to the next one.

How much it cost to set up schedule snapshots on GCP? There is no extra cost for creating a snapshot schedule on GCP. But you have to pay for the snapshot which is (in most situations)  $0.026-$0.035 per GB/month. 

I am also using schedules snapshot to back up my website. My website’s VM server is located in the USA (us-east1-b) and currently it has 3.30 GB of data, So I am paying around  (3.30×0.026) $0.0858 per month.

When we set up snapshot schedule on a Persistent disk Google Cloud create snapshot automatically on an hourly, daily, weekly basis. Just like we discuss earlier, Only the first snapshot will contain all the data and second snapshot that snapshot only contains any new data or modified data since the first snapshot.

So, here are steps to create Snapshots Schedule,

Step 1: Creating a Snapshot Schedule

1. Log in to your Google Cloud account. On your Google Cloud  dashboard and click the hamburger menu in the upper left-hand corner of the screen.

2. After that, Navigate to Compute Engine >> Snapshots.

3. Then click on “Create snapshot” button.

Step 2: Configuring Snapshot Schedule

4. Name: It is your  snapshot name. Give any name as you wise.

5. Region: select where you want to set up your snapshot schedule. Note: It is not the snapshot location, rather it is your schedule location. 

Go to your VM instance or Disk page and check the zone details. As you can see that on the above image that I set up my VM in us-east1.

I select us-east1 Because my VM’s  location is us-east1, I want this schedule to be available in that location. 

6. Snapshot location : select where you want to store your VM snapshot (backup). Choose default if you don’t want to pay any network fees. 

Schedule frequency – choose how often you want to take a backup from daily, weekly, hourly. Start time – at what time backup should be made. Here is link for GMT time converter.

7. Autodelete snapshots after – how many last snapshots you want to keep at any time. 

8. Deletion rule – (very important) what should happen if you delete your VM instance(source disk). If you choose Keep snapshots: then your backups are retained permanently unless you delete them manually. If you choose “Delete snapshots older than * days then your backup get automatically deleted after * days. 

9.  If you are using Windows, you can Enable VSS

10.  Finally, Click Create to create the snapshot schedule.

Step 3: Attaching snapshot schedule to a disk

Once you have created a snapshot schedule, you need to attach it to your source or VM boot disk to generate automatic snapshots.  

11. Navigate to Compute Engine >> Disks.

12. Now click over the name of your VM instance or Source disk.

13. After that, from your right-hand top conner, click on “EDIT” to modify your disks settings.

14. Now, Scroll down to “Snapshot schedule”  and choose your newly created Snapshot schedule.

15. Finally, click Save to apply the schedule on your persistent disk.

Now it is your time!

I tried my best to provide you a complete tutorial on how you can create and set up a snapshot schedule on Google Cloud Platform. I hope you liked it.

If you need help just drop a comment.

If you benefited from this tutorial, and would like to support my work, please like my Facebook page.

Thanks