Restore a NetApp ONTAP volume from a backup vault

Backup and DR lets you recover data by performing a full-volume restore of a Google Cloud NetApp ONTAP volume from a backup vault. You restore the backup into an existing ONTAP data protection (DP) volume in a Google Cloud NetApp Volumes ONTAP-mode storage pool. Use the Google Cloud console or the gcloud CLI to start the restore and track the operation until completion.

Standard NetApp Volumes pricing applies to the destination storage pool and volume.

Limitations

Before you restore a NetApp ONTAP volume from a backup vault, review the following limitations:

  • Destination DP volume required: You must create an ONTAP DP volume (type=DP) in the target ONTAP-mode storage pool before you start a full-volume restore.
  • Full overwrite: Full-volume restore overwrites all existing data in the destination DP volume.
  • Google Cloud console restore modes: In the Google Cloud console, you can use only Edit as JSON mode to perform a full-volume restore. The Restore with original backup settings, Interactive setup form, and Overwrite an existing resource options aren't available for NetApp ONTAP volumes.
  • Post-restore protection: Restored volumes aren't automatically associated with a backup plan. To protect a restored volume, configure a scheduled backup after the restore completes.

Before you begin

Before you restore a backup, prepare your Google Cloud projects, APIs, Identity and Access Management (IAM) roles, and destination ONTAP volume:

  1. Enable the Backup and DR API and the NetApp Volumes API in your backup vault and target projects:

    Enable the APIs

  2. Verify that you have an existing NetApp ONTAP volume backup stored in a backup vault. If you haven't backed up a volume yet, see Back up NetApp ONTAP volumes to a backup vault.

  3. In the target ONTAP-mode storage pool, create an ONTAP DP volume (type=DP) by using the ONTAP CLI proxy or ONTAP REST API proxy. Note the volume's universally unique identifier (UUID). Confirm that the destination DP volume has enough capacity for the restored backup and uses the appropriate security style for your data.

    To run ONTAP commands on an ONTAP-mode storage pool, see Manage ONTAP in ONTAP-mode and Common ONTAP-mode procedures in the NetApp Volumes documentation.

  4. If you plan to use the gcloud CLI, collect the full resource name of the backup to restore in the format projects/VAULT_PROJECT_ID/locations/VAULT_LOCATION/backupVaults/BACKUP_VAULT_NAME/dataSources/DATA_SOURCE_ID/backups/BACKUP_ID. To list available backups, see List protected volumes and backups.

Set up authentication

Select the tab for how you plan to use the samples on this page:

Console

When you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.

gcloud

In the Google Cloud console, activate Cloud Shell.

Activate Cloud Shell

At the bottom of the Google Cloud console, a Cloud Shell session starts and displays a command-line prompt. Cloud Shell is a shell environment with the gcloud CLI already installed and with values already set for your current project. It can take a few seconds for the session to initialize.

Required roles

To get the permissions that you need to restore a NetApp ONTAP volume, ask your administrator to grant you the following IAM roles:

For more information about granting roles, see Manage access to projects, folders, and organizations.

These predefined roles contain the permissions required to restore a NetApp ONTAP volume. To see the exact permissions that are required, expand the Required permissions section:

Required permissions

The following permissions are required to restore a NetApp ONTAP volume:

  • backupdr.bvbackups.restore on the backup vault project
  • backupdr.bvbackups.useReadOnlyForNetappVolumes on the backup vault project
  • backupdr.backupVaults.get on the backup vault project
  • backupdr.backupVaults.list on the backup vault project
  • backupdr.bvdataSources.get on the backup vault project
  • backupdr.bvdataSources.list on the backup vault project
  • backupdr.bvbackups.get on the backup vault project
  • backupdr.bvbackups.list on the backup vault project
  • backupdr.bvbackups.fetchForNetappVolumes on the backup vault project
  • netapp.storagePools.restoreVolume on the target project
  • netapp.ontap.post on the target project
  • netapp.ontap.get on the target project
  • netapp.operations.get on the target project

You might also be able to get these permissions with custom roles or other predefined roles.

Restore a volume

Start a full-volume restore from a backup vault into an existing ONTAP DP volume in your target ONTAP-mode storage pool.

Select one of the following options:

Console

  1. In the Google Cloud console, go to the Vaulted backups page:

    Go to Vaulted backups

  2. Locate the protected NetApp ONTAP volume (listed as VOLUME_UUID), click the more actions menu, and then click Restore. Alternatively, click the volume name, locate the backup that you want to restore, click the more actions menu, and then click Restore.

    The Restore a NetApp ONTAP volume backup page opens.

  3. Verify or select the backup that you want to restore.

  4. Under Choose the restore destination, select the target project.

  5. Under Configure restore, on the Restore to new resource tab, confirm that Modify restore settings and Edit as JSON are selected.

  6. Click Edit configuration. The Edit Backup Configuration pane opens with a prepopulated JSON request similar to the following:

    {
      "name": "projects/TARGET_PROJECT_ID/locations/POOL_LOCATION/storagePools/STORAGE_POOL_ID",
      "backupSource": {
        "backup": "projects/VAULT_PROJECT_ID/locations/VAULT_LOCATION/backupVaults/BACKUP_VAULT_NAME/dataSources/DATA_SOURCE_ID/backups/BACKUP_ID"
      },
      "ontapVolumeTarget": {
        "volumeUuid": "TARGET_VOLUME_UUID"
      }
    }
    

    Review or replace the following values:

    • TARGET_PROJECT_ID: the ID of the target project where you're restoring the volume.
    • POOL_LOCATION: the zone or region of the target ONTAP-mode storage pool, such as us-central1-a or us-central1.
    • STORAGE_POOL_ID: the ID of the target ONTAP-mode storage pool.
    • VAULT_PROJECT_ID: the ID of the project that contains the backup vault (prepopulated).
    • VAULT_LOCATION: the region of the backup vault (prepopulated).
    • BACKUP_VAULT_NAME: the name of the backup vault (prepopulated).
    • DATA_SOURCE_ID: the ID of the data source for the backed-up volume (prepopulated).
    • BACKUP_ID: the ID of the selected backup (prepopulated).
    • TARGET_VOLUME_UUID: the UUID of the destination ONTAP DP volume.
  7. Review and update the JSON request:

    • Set the ontapVolumeTarget.volumeUuid field to the UUID of your destination DP volume.
    • If you're restoring to a different storage pool or location, update the name field to match the target storage pool resource path.
    • Keep the backupSource.backup field unchanged so that it matches the selected backup.
    • Don't add the backupSource.fileList or ontapVolumeTarget.restoreDestinationPath fields, because the Google Cloud console supports full-volume restore only.
  8. Click Save.

  9. Click Restore. Backup and DR starts the restore operation and redirects you to the vaulted resource details page.

gcloud

Restore the backup to the destination ONTAP DP volume by using the gcloud netapp storage-pools restore-volume command:

gcloud netapp storage-pools restore-volume STORAGE_POOL_ID \
    --location=POOL_LOCATION \
    --project=TARGET_PROJECT_ID \
    --backup="projects/VAULT_PROJECT_ID/locations/VAULT_LOCATION/backupVaults/BACKUP_VAULT_NAME/dataSources/DATA_SOURCE_ID/backups/BACKUP_ID" \
    --volume-uuid=TARGET_VOLUME_UUID

Replace the following:

  • STORAGE_POOL_ID: the ID of the target ONTAP-mode storage pool.
  • POOL_LOCATION: the zone or region of the target ONTAP-mode storage pool, such as us-central1-a or us-central1.
  • TARGET_PROJECT_ID: the ID of the target project where you're restoring the volume.
  • VAULT_PROJECT_ID: the ID of the project that contains the backup vault.
  • VAULT_LOCATION: the region of the backup vault, such as us-central1.
  • BACKUP_VAULT_NAME: the name of the backup vault.
  • DATA_SOURCE_ID: the ID of the data source for the backed-up volume.
  • BACKUP_ID: the ID of the backup to restore.
  • TARGET_VOLUME_UUID: the UUID of the destination ONTAP DP volume.

When prompted to confirm the restore, enter Y. To return without waiting for the operation to finish, add the --async flag and note the returned operation resource name.

Monitor and verify the restore

Track the restore operation until it completes. After the restore succeeds, verify your data in the restored volume. For ongoing protection, configure a scheduled backup.

Select one of the following options:

Console

  1. On the Google Cloud console toolbar, click Notifications.

  2. Locate the Restore backup to ONTAP volume operation for your destination volume UUID and monitor its progress until the operation completes.

gcloud

By default, the restore command waits until the operation completes and returns the result. If you used the --async flag, check the restore operation status by using the gcloud netapp operations describe command:

gcloud netapp operations describe OPERATION_NAME

Replace OPERATION_NAME with the full operation resource name returned by the restore command. When the operation finishes, the response includes done: true.

What's next