Protect and recover disks in Backup and DR Service

This page details how to use Backup and DR Service to back up the disks of a Compute Engine instance. It is an end-to-end overview about how to back up and restore your disks and monitor your backups.

Before you begin

Before you begin, be sure that you have these prerequisites:

  1. This quickstart assumes that you have Backup and DR Service API enabled in your project.
  2. You will need a backup vault. If you don't have a backup vault, then Create a backup vault.
  3. You will need a backup plan configured to protect disks. To create a backup plan for disks, follow these steps:

    1. In the Google Cloud console, go to the Backup plans page. Go to Backup plans

    2. Click Create Backup plan.

    3. For Resource type, select Disks.

    4. In the Backup plan name field, enter a name for the backup plan. You can't change the name of a plan after the backup plan is created.

    5. In the Backup plan description field, enter an optional description for the backup plan.

    6. From the Regions list, select a backup plan region. The backup plan is created in this region. You can protect resources in the same region as the backup plan.

    7. From the Backup vault list, select a backup vault to store the backups.

    8. Click Add rule.

    9. In the Add a backup rule pane, enter your backup rule information and click Save.

      • Name your backup rule: Enter a name for the backup rule.
      • Choose when to create backups: Specify the recurrence and frequency of the backup.
      • Window: Select the Timezone, Start time, and Endtime for the backup job.
      • Choose how long backups are kept before they are deleted: Enter the duration in days that the backups should be retained before they are deleted. Note that this value must be equal to or greater than the backup vault minimum enforced retention period.
    10. Click Create.

Configure backup for disks

To back up disks, follow these steps:

  1. In your project, in Backup and DR, click Vaulted backups.
  2. Click Schedule backups.
  3. In the Choose resources page that appears, complete the following:
    • Resource type: Select Disks.
    • Project: The current project is selected, or you can browse to the project that contains the disks that you want to back up.
    • Region: Select the region where your resources are located.
    • Resources: Click Browse to open a pane where you can select the disks to back up into this backup vault.
  4. Click Continue.
  5. In the Select a backup plan page select a backup plan and then click Done.
  6. Click Continue.
  7. Review your selections and click Schedule. At this point you have associated a backup plan with the disks. The backup plan schedules the chosen disks to get backed up per the frequency set in the backup policy, but they are not backed up up yet.
  8. From the Resources with vaulted backups, select the resource that you just assigned the backup plan to. Click Create an on-demand backup. An on-demand backup is a backup job that you can manually trigger at any time.
  9. Review the details and click Create.

Restore disks

You can restore the source Compute Engine instance using a Restore operation and restore instance to an alternate location using the Mount operation.

  1. On the Vaulted backups page, select the disk to restore.
  2. In the Backup details list, select the disk backup, and then select Restore under the icon.
  3. The Choose the backup to restore section is prefilled with the information about the selected disk.
  4. The Choose the restore destination is prefilled with the current project. Don't change it for this exercise.
  5. If you need any permissions, the next section indicates which ones with a link to get them.
  6. Click Restore. The disk is restored to the selected project with the same name appended by "-restore-" and a date and timestamp. You can see it in Compute Engine > Storage > Disks.