Backing up and Restoring Data on GCP

You can use a snapshot of an instance or a disk to backup or restore information in case of failures. A snapshot represents a state of an instance or disk at a point in time.

Creating a Snapshot of a Disk on GCP

This section describes the steps to create a snapshot of a disk.

To create a snapshot on GCP:

  1. On the Compute Engine dashboard, click Snapshots.

    The Snapshots screen appears.

  2. Click Create Snapshot.

    The Create a snapshot screen appears.

  3. Enter information in the following text boxes.

    • Name - Name of the snapshot.
    • Description – Description for the snapshot.
  4. Select the required disk for which the snapshot is to be created from the Source Disk drop-down list.

  5. Click Add Label to add a label to the snapshot.

  6. Enter the label in the Key and Value text boxes.

  7. Click Add Label to add additional tags.

  8. Click Create.

    • Ensure that the status of the snapshot is set to completed.

    • Ensure that you note the snapshot id.

Restoring from a Snapshot on GCP

This section describes the steps to restore data using a snapshot.

Before you begin

Ensure that a snapshot of the disk was created before beginning this process.

How to restore data using a snapshot

To restore data using a snapshot on GCP:

  1. Navigate to Compute Engine > VM instances.

    The VM instances screen appears.

  2. Select the required instance.

    The screen with instance details appears.

  3. Stop the instance.

  4. After the instance is stopped, click EDIT.

  5. Under the Boot Disk area, remove the existing disk.

  6. Click Add Item.

  7. Select the Name drop-down list and click Create a disk.

    The Create a disk screen appears.

  8. Under Source Type area, select the required snapshot.

  9. Enter the other details, such as, Name, Description, Type, and Size (GB).

  10. Click Create.

    The snapshot of the disk is added in the Boot Disk area.

  11. Click Save.

    The instance is updated with the new snapshot.