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
Select the snapshot tab in the source type and choose the appropriate snapshot from the list,
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
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
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
Verify if the disk-2 is attached to the datacloudies-2 instance,
That is it. We have completed the snapshot restoration task successfully. Please go ahead to other tutorials in the compute engine.