1
votes

I have a Virtual Machine Instance running in Google-Cloud Platform. I see there is an API to snapshot any disk in google-cloud BUT what i'm looking for is - a way/API which snapshots the whole VM-Instance. By that - the API should snapshot boot-disk, attached-disk & all this in one file/object. So that - this object can be used to re-create the environment whenever i can restore using the object.

1
I think, in AWS something like this is done through a single API & which is known as AMI ( which stores the point-in-time copy of boot as well as data disks) Looking for similar option in Google-Cloud Platformamitam

1 Answers

0
votes

In Google-Cloud, the snapshot-able is only Disks. So, as an instance or host snapshot, we can take snapshot of boot-disks, for having resiliency of boot-disk's recovery. If we need to protect data-disks, then snapshots of data-disks should be taken separately for each of the disks.

Hence, when there is a need to take the snapshot of Whole Host/Instance, then we need to take snapshot of

  1. Boot-Disk of Instance/Machine
  2. All Data-Disks attached to instance

And, its upto us now to maintain rather associate them in one way or other.

  1. Tags/Labels can be used to make snapshots identify that its part of Instance rather Hose snapshot, so at the time of recovery - we can search for the snapshots of same labels & trigger recover from those set of snapshots.
  2. Give snapshots name with some common string. This way - snapshots starting from a particular string, would be part of the instance's snapshot & this identification should help at the time of recovery.

Please NOTE: these snapshots are crash-consistent snapshots.

This is how the snapshots of Instance/Machine needs to be taken in Google-Cloud Compute Engine.