Google Cloud Snapshot Management – Create & Restore

Published: 26 April 2021
on channel: Decode ITES
4,209
22

#DecodeITeS

GCP provided you the option of taking snapshot backups to reduce the risk of unexpected data loss. As per best practices, you should configure a regular snapshot to ensure your data is backed up on a regular schedule.
You can restore the snapshot on the same device as overwrite or can create a separate machine or disk.
You can perform snapshot functions using Google Cloud Web Console or gcloud command line.
You cannot change the storage location of an existing snapshot. Although Snapshots are global resources that means all resources in the project can access snapshot and you can share snapshot access projects as well.
You can snapshot your disks at most once every 10 minutes. 
Snapshot is a cost-friendly backup approach. By default, snapshots are incremental and automatically compressed to avoid additional billing for redundant data and ensure the least usage of storage space. As per best practices and to maintain the reliability of snapshot history, a snapshot might occasionally capture a full image of the disk or you can plan it accordingly.
Snapshot does not require any downtime. You can create snapshots from disks even while they are attached to running instances.

Snapshot availability and retrieval network cost are dependent on location. Snapshot location can be multi-regional like the US or ASIA OR regional storage. You can specify the location at the time of snapshot creation else default location which will be geographically closest to the location of machine or disk will be assigned. For example, if your persistent disk is stored in us-central1, your snapshot is stored in us multi-region by default.

Snapshot network cost completely depends on the snapshot location. You can wisely choose the location to save network costs. For example,
If your source disk is in asia-east1-a you can store your snapshot in the asia-east1 region or the asia multi-region. You won't incur a network cost when you access your snapshots.

Whereas if your source disk is in asia-east1 and you store your snapshots in asia-east2, you will incur a network cost when you access your snapshot between those two regions.



Snapshot Creation Process

By Default, Snapshots are incremental to avoid additional billing for redundant data and ensure the least usage of storage space.

Snapshot 1: Full snapshot contains all data and works as a baseline of the next incremental backups.

Snapshot 2: Next snapshot after full, will be an incremental one. Only changes made after the last snapshot will be backed up. It also saves a reference to unchanged data from the last full snapshot.
 
Snapshot 3: This contains any new or changed data since snapshot 2 but won't contain any unchanged data from snapshot 1 or 2. Instead, snapshot 3 contains references to blocks in snapshot 1 and snapshot 2 for any unchanged data.

Snapshot Deletion Process

We have reviewed the snapshot process and see how incremental snapshot depends on the last incremental and full snapshot. Now, when you want to delete the snapshot, my concern is delete allowed for snapshot having a dependent snapshot, and if yes how snapshot chain will be maintained. GCP snapshots are very smart and they have an internal mechanism to maintain it.
 

When you delete a snapshot, the Compute Engine checks if the snapshot has any dependent snapshot or not. In case of no dependent snapshot, the compute engine will delete it immediately. However, if the snapshot does have dependent snapshots:

Any data that is required for restoring other snapshots are moved into the next snapshot, increasing its size.

Any data that is not required for restoring other snapshots are deleted. This lowers the total size of all your snapshots.

The next snapshot no longer references the snapshot marked for deletion and instead references the snapshot before it.


Watch video Google Cloud Snapshot Management – Create & Restore online without registration, duration hours minute second in high quality. This video was added by user Decode ITES 26 April 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 4,209 once and liked it 22 people.