Search code examples
google-cloud-platform

Making Exact Copy of Server Google Cloud


I have recently started using Google Cloud over Digital Ocean because they are now offering a free trial. Although I am having an issue with figuring out how to make an exact copy of a server.

On Digital ocean, I can create an exact copy of a server as a new server, this will copy over all installd files and configurations to the new server. But all I have been able to find on GCP is a way to create a similar instance, but this only copies the settings of the ubuntu image. Is there a way to make an exact copy of a server on Google Cloud Platform? Thank you in advance!


Solution

  • You have two options:

    a. Using persistent disk snapshots
    b. Using machine image(Beta)

    The same point of those methods is create some "Image" from your original server, and create new instance from the "Image".
    The difference between (a.) and (b.) is, the scope of backup.

    (a.) is only about a disk.
    (b.) contains all the configuration, metadata, permissions, and data from one or more disks for a VM instance running on Compute Engine.

    Please refer the official documents below.

    Reference

    Persistent Disk Snapshots
    https://cloud.google.com/compute/docs/disks/create-snapshots

    Machine Images
    https://cloud.google.com/compute/docs/machine-images