How to use Snapshots

How to use Snapshots

What is Snapshots?

Snapshot is a copy of your disk in a concrete instant at the time. Snapshot is used to create a backup for VM Instance. Snapshots store data comparatively. It means if you have a previous snapshot of the disk. The new snapshot only store the new data and changes from the previous one. It helps to save the disk space.

How to use Snapshot for google cloud computing engine?

First, refer below image for the current working VM instance. Apache is running and we can access our website.

Our VM instance is running without any issue. To create a snapshot for the current VM state click on Snapshots under "Compute Engine". Refer the following image for information.
If you're on Compute Engine.

From any other place

Click on Create snapshot Button.

Complete all the information. As the best practice always provides a proper description. Source Disk is our VM instance. Don't change any other settings. Click on Create Snapshot.

Snapshot for our VM instance created.
We will break our server for snapshot testing. For this article, we will uninstall apache2. Next, we will restore previous machine state using Snapshot.
Note: Please use the following command with precaution in the production environment.
"sudo apt-get remove apache2*"

Visit our website again. It will not work, Why?
Because Apache is no longer available for handle HTTP request.

We need to restore our machine state using Snapshot. To restore our machine from the snapshot first stop the current VM Instance. Select Snapshot to restore. For this article, we have only one. Select snapshot and click on Create Instance. It will create a new Snapshot for our VM Instance.

Create a new Instance. If required change the IP address on DNS Zone. Again visit your website. It will show the web page state at the time of snapshot.

Leave A Comment

Please login to post your valuable comments.

Join the newsletter

Get the latest vLemonn news first