This lab walks you through GCP Storage Disk, Snapshot for backup and snapshot schedule.
In this lab, we will create a Storage Disk.
You will create a snapshot manually and a snapshot schedule.
Duration: 45 minutes
Compute Engine provides several different types of storage options that you can choose while creating an Instance.
Persistent disks are durable network storage devices available for your instances, and You can access it like a physical disk on a desktop.
Persistent disks can be created independently from your Compute Engine (VM) instances so that you can detach the disks to keep your data after deletion of instances or attach to different VMs. The performance of these disks scales automatically with size, and you can resize your existing disks or add more persistent disks to your instance to improve your performance or storage needs.
There are multiple Disk options available while creating a Disk,
First, you have to choose a Zonal or Regional disk type. As the name specifies Zonal persistent disks have disks available in a single Zone. Still, regional disks offer durable storage and redundancy of data between two zones in the same region.
Standard persistent disks are just like using standard hard disk drives (HDD).
Balanced persistent disks are just like using solid-state drives (SSD) but with balanced performance and cost.
SSD persistent disks are just like using solid-state drives (SSD).
Now about the backup solution. Let's try to understand with the help of an example, If you have ever used a portable HDD or SSD, you might have heard of accidentally dropped the disk, or suddenly the disk stopped working if something goes wrong for any reason. To avoid such cases, we should always have a backup ready.
In Google Cloud, there are two ways that one can use to keep data safe and enable point in time recovery. One common way to create a Google Cloud backup is to create a Snapshot manually, but that is not sufficient to protect the data, we cannot ensure if all the data is protected, let's say manual snapshot is too old. Here we can create the snapshots automatically at a given schedule with the frequency you choose depending on the updates you make on data. You can also choose time to retain the snapshot using the snapshot retention policy. They allow you to create a point-in-time backup of a persistent disk and save it to Google Cloud Storage.
A snapshot is an incremental copy of your data—the first snapshot contains all the data after that snapshots only save data blocks that changed after the last snapshot. You can refer to the below diagram. It is quite clear from the diagram.
You can choose between given location options when saving a snapshot:
Multi-regional location— Saving a snapshot in a multi-regional location means the snapshot will be replicated across multiple regions.
Regional location— Saving a snapshot to a regional location means the snapshot will be stored in one region only and allows you to choose the specific region it will be stored in.
Login into GCP Console.
Creating a Compute Engine Disk
Creating a Snapshot manually.
Creating a Snapshot schedule.