Restore data from a Snapshot in Compute Engine



This tutorial is the continuation of the “backup a persistent disk” section. If you want to visit the previous post, please follow this link. If you would like to check the compute engine components, please follow this link

Restore snapshot through the web console


Let us consider that we have a list of snapshots in the row,

First we will restore the snapshot through the web console and then will go for the command line later in this post.

Go to disk, create disk

datacloudies snapshot gce

Select the snapshot tab in the source type and choose the appropriate snapshot from the list,

datacloudies snapshot gce

Click on create once you have selected the needed configurations. This will create a new disk from the existing snapshot. 

Restore snapshot through command-line


Let us connect to the project in the gcloud before restoring the snapshot

gcloud compute disks create disk-2 --source-snapshot=z4030ydvzegc --size=20GB --zone=us-central1-a

datacloudies snapshot gce

Note: --type flag is required when the snapshot and newly created disk are in different storage types. Otherwise, this will take the same storage type.

Let us verify the same through the web console

datacloudies snapshot gce

Disk-2 is created successfully and currently not attached in any of the instances. 

gcloud compute instances attach-disk datacloudies-2 --disk=disk-2 --zone=us-central1-a

datacloudies snapshot gce

Verify if the disk-2 is attached to the datacloudies-2 instance,

datacloudies snapshot gce



That is it. We have completed the snapshot restoration task successfully. Please go ahead to other tutorials in the compute engine.


Recent Posts