Backup and DR lets you store scheduled and on-demand backups of
Google Cloud NetApp ONTAP volumes in a regional
[backup vault](https://docs.cloud.google.com/backup-disaster-recovery/docs/concepts/backup-vault.md.txt)
in the same region as your storage pool or in a different supported region for
cross-region backups. Regional backup vaults help protect your data
with immutability and enforced retention. Use the Google Cloud console or the
[gcloud CLI](https://docs.cloud.google.com/sdk/gcloud.md.txt) to manage backup plans and stored backups for volumes in
[Google Cloud NetApp Volumes ONTAP-mode storage pools](https://docs.cloud.google.com/netapp/volumes/docs/ontap/overview.md.txt).

Standard
[Backup and DR pricing](https://cloud.google.com/backup-disaster-recovery/pricing)
applies to backups stored in a backup vault.

## Limitations

Before you configure backups for NetApp ONTAP volumes, review the
following limitations:

- **ONTAP-mode storage pools only**: Backup and DR supports this workflow only for volumes in Flex Unified storage pools configured in ONTAP mode.
- **Manual volume selection**: Automatic volume discovery isn't available. You must specify the storage pool and the volume universally unique identifiers (UUIDs) when you configure backups.
- **Regional backup vaults only**: You can store same-region and cross-region backups in regional backup vaults. Backup and DR doesn't support multi-region backup vaults for NetApp ONTAP volumes.
- **Google Cloud console visibility** : The **Protection summary** page isn't available for NetApp ONTAP volumes, and direct links from the **Vaulted backups** page to an ONTAP volume details page aren't available.

## Before you begin

Prepare your Google Cloud projects, APIs, Identity and Access Management (IAM) roles, and
backup resources before you schedule backups:

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

   [Enable the APIs](https://console.cloud.google.com/apis/enableflow?apiid=backupdr.googleapis.com,netapp.googleapis.com)
2. Verify that your ONTAP-mode storage pool is in the `READY` state, and collect
   the UUIDs of the volumes that you want to back up. Each ONTAP volume that you
   back up must be of type `RW` (read-write) and in the `online` state. Volume
   UUIDs use the standard `8-4-4-4-12` hexadecimal format, such as
   `5dc61a44-3d99-11f1-b8ff-39021cc41d7a`. To query volume details and UUIDs by
   using the ONTAP CLI proxy or ONTAP REST API proxy, see
   [Manage ONTAP in ONTAP-mode](https://docs.cloud.google.com/netapp/volumes/docs/ontap/manage-ontap.md.txt) and
   [Common ONTAP-mode procedures](https://docs.cloud.google.com/netapp/volumes/docs/ontap/common-ontap-mode-procedures.md.txt)
   in the NetApp Volumes documentation.

3. Create a regional backup vault in one of the following locations:

   - **Same-region backups** : Create the backup vault in the same region as your ONTAP-mode storage pool. If your storage pool is in a zone, such as `us-central1-a`, create the backup vault in the corresponding region, `us-central1`.
   - **Cross-region backups** : Create the backup vault in a different supported region in the same NetApp Volumes region group as your ONTAP-mode storage pool. For supported regions and region groups, see [Supported regions and cross-regions](https://docs.cloud.google.com/backup-disaster-recovery/docs/concepts/backup-vault.md.txt#regions) and [Region groups](https://docs.cloud.google.com/netapp/volumes/docs/protect-data/about-backups.md.txt#region-groups).

   For instructions, see
   [Create and manage a backup vault in the Google Cloud console](https://docs.cloud.google.com/backup-disaster-recovery/docs/cloud-console/backup-vault-create.md.txt).
4. Create a backup plan in the same region as your ONTAP-mode storage pool and
   associate the plan with your backup vault. If your storage pool is
   in a zone, such as `us-central1-a`, create the backup plan in the
   corresponding region, `us-central1`. For cross-region backups, create the
   backup plan in the storage pool region, not the backup vault region.
   When you create the backup plan, select **NetApp ONTAP Volumes** as the
   resource type in the Google Cloud console, or pass the
   `--resource-type="netapp.googleapis.com/storagePools/ontap"` flag in the
   gcloud CLI. For a cross-region backup vault in the
   gcloud CLI, specify the full backup vault resource name
   for the `--backup-vault` flag. For instructions, see
   [Manage a backup plan](https://docs.cloud.google.com/backup-disaster-recovery/docs/cloud-console/backup-plan-create.md.txt).

   Backup plans for NetApp ONTAP volumes enforce the following
   scheduling and retention limits:
   - **Minimum backup interval**: 1 hour
   - **Minimum backup window**: 1 hour for hourly and daily schedules; 4 hours for weekly, monthly, and yearly schedules
   - **Maximum retention period**: 90 days (hourly), 186 days (daily), 366 days (weekly), 732 days (monthly), and 36,159 days (yearly)
   - **Backup operation timeout**: 152 hours

### 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](https://console.cloud.google.com/?cloudshell=true)


At the bottom of the Google Cloud console, a
[Cloud Shell](https://docs.cloud.google.com/shell/docs/how-cloud-shell-works.md.txt)
session starts and displays a command-line prompt. Cloud Shell is a shell environment
with the [gcloud CLI](https://docs.cloud.google.com/sdk/gcloud.md.txt)
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 back up NetApp ONTAP volumes and manage vaulted
backups,

ask your administrator to grant you the
following IAM roles:

- Configure scheduled backups, change backup plans, create on-demand backups, view backups, and remove backup plans:
  - [Backup and DR Backup User](https://docs.cloud.google.com/iam/docs/roles-permissions/backupdr.md.txt#backupdr.backupUser) (`roles/backupdr.backupUser`) on the backup vault project and the workload project
  - [Google Cloud NetApp Volumes Admin](https://docs.cloud.google.com/iam/docs/roles-permissions/netapp.md.txt#netapp.admin) (`roles/netapp.admin`) on the workload project
- Delete vaulted backups: [Backup and DR Backup Vault Admin](https://docs.cloud.google.com/iam/docs/roles-permissions/backupdr.md.txt#backupdr.backupvaultAdmin) (`roles/backupdr.backupvaultAdmin`) on the backup vault project


For more information about granting roles, see [Manage access to projects, folders, and organizations](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access.md.txt).


These predefined roles contain

the permissions required to back up NetApp ONTAP volumes and manage vaulted
backups. To see the exact permissions that are
required, expand the **Required permissions** section:


#### Required permissions

The following permissions are required to back up NetApp ONTAP volumes and manage vaulted
backups:

- Configure scheduled backups, change backup plans, create on-demand backups, view backups, and remove backup plans:
  - `backupdr.backupPlans.get` on the backup vault project
  - `backupdr.backupPlans.list` on the backup vault project
  - `backupdr.backupPlans.useForNetappVolumes` on the backup vault project
  - `backupdr.backupPlanAssociations.createForNetappVolumes` on the workload project
  - `backupdr.backupPlanAssociations.updateForNetappVolumes` on the workload project
  - `backupdr.backupPlanAssociations.deleteForNetappVolumes` on the workload project
  - `backupdr.backupPlanAssociations.getForNetappVolumes` on the workload project
  - `backupdr.backupPlanAssociations.fetchForNetappVolumes` on the workload project
  - `backupdr.backupPlanAssociations.list` on the workload project
  - `backupdr.backupPlanAssociations.triggerBackupForNetappVolumes` on the workload 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
  - `backupdr.dataSourceReferences.getForNetappVolumes` on the workload project
  - `backupdr.dataSourceReferences.fetchForNetappVolumes` on the workload project
  - `backupdr.locations.list` on the backup vault project and the workload project
  - `backupdr.operations.get` on the backup vault project and the workload project
  - `netapp.storagePools.get` on the workload project
  - `netapp.storagePools.list` on the workload project
  - `netapp.storagePools.updateBackupConfig` on the workload project
  - `netapp.ontap.get` on the workload project
  - `netapp.volumes.createCrossProjectBackup` on the workload project
  - `netapp.operations.get` on the workload project
- Delete vaulted backups: `backupdr.bvbackups.delete` on the backup vault project


You might also be able to get
these permissions
with [custom roles](https://docs.cloud.google.com/iam/docs/creating-custom-roles.md.txt) or
other [predefined roles](https://docs.cloud.google.com/iam/docs/roles-overview.md.txt#predefined).

### Optional: Grant cross-project access to the backup vault service agent

If your ONTAP-mode storage pool and your backup vault are in the same
project, you don't need to grant any additional IAM roles. The
Backup and DR service agent already has the required permissions.

If your ONTAP-mode storage pool is in a different workload project from your
backup vault, create a custom IAM role in that workload
project. Grant the custom role to the unique service agent for your
backup vault. To create and grant the custom role, you need the
[Role Administrator role](https://docs.cloud.google.com/iam/docs/roles-permissions/iam.md.txt#iam.roleAdmin)
(`roles/iam.roleAdmin`) and the
[Project IAM Admin role](https://docs.cloud.google.com/iam/docs/roles-permissions/resourcemanager.md.txt#resourcemanager.projectIamAdmin)
(`roles/resourcemanager.projectIamAdmin`) on the workload project. Include the
following permissions in the custom role:

- `netapp.ontap.get`
- `netapp.storagePools.get`
- `netapp.operations.get`
- `netapp.volumes.createCrossProjectBackup`

Select one of the following options:

### Console

1. In the Google Cloud console, go to the **Backup vaults** page in the
   backup vault project:

   [Go to Backup vaults](https://console.cloud.google.com/backupdr/backup-vaults/list)
2. Click the name of your backup vault.

3. Under **Backup vault service agent** , copy the email address in the
   **Service agent** field.

4. In the workload project,
   [create a custom role](https://docs.cloud.google.com/iam/docs/creating-custom-roles.md.txt#creating) that
   includes the four preceding permissions.

5. [Grant the custom role](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access.md.txt#grant-single-role)
   on the workload project to the backup vault service agent email
   address that you copied.

### gcloud

1. Create a custom role in the workload project:

   ```bash
   gcloud iam roles create CUSTOM_ROLE_ID \
       --project=WORKLOAD_PROJECT_ID \
       --title="Backup and DR NetApp ONTAP Cross-Project Backup" \
       --description="Permissions for cross-project NetApp ONTAP backups" \
       --permissions="netapp.ontap.get,netapp.storagePools.get,netapp.operations.get,netapp.volumes.createCrossProjectBackup" \
       --stage=GA
   ```

   Replace the following:
   - `CUSTOM_ROLE_ID`: a unique identifier for the custom role, such as `backupdrOntapCrossProjectBackup`.
   - `WORKLOAD_PROJECT_ID`: the ID of the project that contains your ONTAP-mode storage pool.
2. Retrieve the email address of your backup vault service agent:

   ```bash
   gcloud backup-dr backup-vaults describe BACKUP_VAULT_NAME \
       --location=VAULT_REGION \
       --project=VAULT_PROJECT_ID \
       --format="value(serviceAccount)"
   ```

   Replace the following:
   - `BACKUP_VAULT_NAME`: the name of the backup vault.
   - `VAULT_REGION`: the region of the backup vault, such as `us-central1`.
   - `VAULT_PROJECT_ID`: the ID of the project that contains your backup vault.
3. Grant the custom role to the backup vault service agent:

   ```bash
   gcloud projects add-iam-policy-binding WORKLOAD_PROJECT_ID \
       --member="serviceAccount:BACKUP_VAULT_SERVICE_AGENT" \
       --role="projects/WORKLOAD_PROJECT_ID/roles/CUSTOM_ROLE_ID"
   ```

   Replace `BACKUP_VAULT_SERVICE_AGENT` with the
   service agent email address returned in the previous step.

## Configure a scheduled backup

To schedule automated backups of one or more NetApp ONTAP volumes
to a backup vault, associate a backup plan with the volumes.

Select one of the following options:

### Console

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

   [Go to Vaulted backups](https://console.cloud.google.com/backupdr/vaulted-backups)
2. Click **Schedule backup**.

3. In the **Resource type** list, select **NetApp ONTAP Volumes**.

4. Select the **Project** and **Region** for your ONTAP-mode storage pool.

5. Under **Resources** , click **Browse** . The **Select NetApp ONTAP
   volumes** pane opens.

6. In the **Storage pool** list, select an ONTAP-mode storage pool in the
   `READY` state. Storage pools appear in the format
   `STORAGE_POOL_ID (POOL_LOCATION)`,
   where `STORAGE_POOL_ID` is the pool ID and
   `POOL_LOCATION` is the pool's zone or region.

7. In the **Volume UUIDs** field, enter one or more volume UUIDs separated
   by commas, semicolons, or spaces.

8. Click **Add to selection** . The volumes appear in the **Selected
   volumes** table.

   Optional: To add volumes from additional storage pools, select another
   storage pool, enter its volume UUIDs, and click **Add to selection**.
9. Click **Done**.

10. Under **Select a backup plan** , in the **Backup Plan** field, click
    **Browse** , select a backup plan configured for
    NetApp ONTAP volumes, and then click **Select**.

11. Review the configuration, and then click **Schedule**.

### gcloud

Create a backup plan association to schedule backups for the volume:

```bash
gcloud backup-dr backup-plan-associations create \
    BACKUP_PLAN_ASSOCIATION_NAME \
    --location=REGION \
    --backup-plan="projects/BACKUP_PLAN_PROJECT_ID/locations/REGION/backupPlans/BACKUP_PLAN_NAME" \
    --resource="projects/WORKLOAD_PROJECT_ID/locations/POOL_LOCATION/storagePools/STORAGE_POOL_ID/ontap/VOLUME_UUID" \
    --resource-type="netapp.googleapis.com/storagePools/ontap" \
    --workload-project=WORKLOAD_PROJECT_ID
```

Replace the following:

- `BACKUP_PLAN_ASSOCIATION_NAME`: a unique name for the backup plan association.
- `REGION`: the region of the backup plan and backup plan association, such as `us-central1`. For a zonal storage pool (such as `us-central1-a`), specify the corresponding region (`us-central1`).
- `BACKUP_PLAN_PROJECT_ID`: the ID of the project that contains the backup plan.
- `BACKUP_PLAN_NAME`: the name of the backup plan.
- `WORKLOAD_PROJECT_ID`: the ID of the project that contains the ONTAP-mode storage pool.
- `POOL_LOCATION`: the zone or region of the ONTAP-mode storage pool, such as `us-central1-a` or `us-central1`.
- `STORAGE_POOL_ID`: the ID of the ONTAP-mode storage pool.
- `VOLUME_UUID`: the UUID of the ONTAP volume, such as `5dc61a44-3d99-11f1-b8ff-39021cc41d7a`.

## List protected volumes and backups

Verify that your NetApp ONTAP volumes are protected by a backup
plan and view backups stored in your backup vault.

Select one of the following options:

### Console

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

   [Go to Vaulted backups](https://console.cloud.google.com/backupdr/vaulted-backups)
2. Locate your protected NetApp ONTAP volume, listed as
   `VOLUME_UUID`.

3. To open the volume's data source details page and view available backups,
   click the volume name.

### gcloud

1. List the backup plan associations in the workload project:

   ```bash
   gcloud backup-dr backup-plan-associations list \
       --location=REGION \
       --project=WORKLOAD_PROJECT_ID
   ```

   Replace the following:
   - `REGION`: the region of the backup plan associations, such as `us-central1`.
   - `WORKLOAD_PROJECT_ID`: the ID of the project that contains the ONTAP-mode storage pool.
2. List backups stored in a backup vault:

   ```bash
   gcloud backup-dr backups list \
       --backup-vault=BACKUP_VAULT_NAME \
       --data-source=DATA_SOURCE_ID \
       --location=VAULT_REGION \
       --project=VAULT_PROJECT_ID
   ```

   Replace the following:
   - `BACKUP_VAULT_NAME`: the name of the backup vault.
   - `DATA_SOURCE_ID`: the ID of the data source for the ONTAP volume.
   - `VAULT_REGION`: the region of the backup vault, such as `us-central1`.
   - `VAULT_PROJECT_ID`: the ID of the project that contains the backup vault.

   To list backups across all data sources, backup vaults, or
   locations in the project, omit the `--data-source`, `--backup-vault`, or
   `--location` flags.

## Change a backup plan

You can switch a protected NetApp ONTAP volume to a different
backup plan. The replacement backup plan must use the same backup vault
and region as the original backup plan.

Select one of the following options:

### Console

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

   [Go to Vaulted backups](https://console.cloud.google.com/backupdr/vaulted-backups)
2. In the row for the NetApp ONTAP volume, click the
   **more actions** menu, and then click **Change
   backup plan**.

3. Select another backup plan that uses the same backup vault.

4. Click **Apply**.

### gcloud

Update the backup plan association to use a different backup plan:

```bash
gcloud backup-dr backup-plan-associations update \
    BACKUP_PLAN_ASSOCIATION_NAME \
    --location=REGION \
    --backup-plan="projects/BACKUP_PLAN_PROJECT_ID/locations/REGION/backupPlans/TARGET_BACKUP_PLAN_NAME" \
    --workload-project=WORKLOAD_PROJECT_ID
```

Replace the following:

- `BACKUP_PLAN_ASSOCIATION_NAME`: the name of the backup plan association.
- `REGION`: the region of the backup plan and backup plan association, such as `us-central1`.
- `BACKUP_PLAN_PROJECT_ID`: the ID of the project that contains the backup plan.
- `TARGET_BACKUP_PLAN_NAME`: the name of the replacement backup plan.
- `WORKLOAD_PROJECT_ID`: the ID of the project that contains the ONTAP-mode storage pool.

## Create an on-demand backup

You can create an on-demand backup for a protected NetApp ONTAP
volume outside its scheduled backup window. To monitor backup progress on the
**Jobs** page in the Google Cloud console, see
[Monitor jobs](https://docs.cloud.google.com/backup-disaster-recovery/docs/monitor-reports/monitor-jobs-console.md.txt).

Select one of the following options:

### Console

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

   [Go to Vaulted backups](https://console.cloud.google.com/backupdr/vaulted-backups)
2. In the row for the NetApp ONTAP volume, click the
   **more actions** menu, and then click **Create
   on-demand backup**.

3. To define the retention period, under **Choose when to delete this
   backup**, select one of the following options:

   - Select **Based on custom retention period**, and then enter a retention period in days.
   - Select **Based on an existing backup rule**, and then select a backup rule from the backup plan.
4. Click **Create**.

### gcloud

Trigger an on-demand backup by using a rule from the associated backup plan:

```bash
gcloud backup-dr backup-plan-associations trigger-backup \
    BACKUP_PLAN_ASSOCIATION_NAME \
    --location=REGION \
    --backup-rule-id=RULE_ID \
    --workload-project=WORKLOAD_PROJECT_ID
```

Replace the following:

- `BACKUP_PLAN_ASSOCIATION_NAME`: the name of the backup plan association.
- `REGION`: the region of the backup plan association, such as `us-central1`.
- `RULE_ID`: the ID of the backup rule in the associated backup plan that defines the retention period.
- `WORKLOAD_PROJECT_ID`: the ID of the project that contains the ONTAP-mode storage pool.

To specify a custom retention period instead of a backup rule, replace the
`--backup-rule-id` flag with the
`--custom-retention-days=RETENTION_DAYS` flag.
Replace `RETENTION_DAYS` with the number of days to
retain the backup. These flags are mutually exclusive.

## Remove a backup plan

Removing a backup plan detaches it from the NetApp ONTAP volume
and stops future scheduled backups. Removing the plan doesn't delete the backup
plan itself or any existing backups stored in the backup vault.
Existing backups remain available until they expire or you delete them.

Select one of the following options:

### Console

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

   [Go to Vaulted backups](https://console.cloud.google.com/backupdr/vaulted-backups)
2. In the row for the NetApp ONTAP volume, click the
   **more actions** menu, and then click **Remove
   backup plan**.

3. In the confirmation dialog, click **Remove backup plan**.

### gcloud

Delete the backup plan association for the volume:

```bash
gcloud backup-dr backup-plan-associations delete \
    BACKUP_PLAN_ASSOCIATION_NAME \
    --location=REGION \
    --workload-project=WORKLOAD_PROJECT_ID
```

Replace the following:

- `BACKUP_PLAN_ASSOCIATION_NAME`: the name of the backup plan association.
- `REGION`: the region of the backup plan association, such as `us-central1`.
- `WORKLOAD_PROJECT_ID`: the ID of the project that contains the ONTAP-mode storage pool.

## Delete a backup

You can delete individual vaulted backups after their enforced retention period
expires.

Select one of the following options:

### Console

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

   [Go to Vaulted backups](https://console.cloud.google.com/backupdr/vaulted-backups)
2. To open the backups list for the NetApp ONTAP volume,
   click the volume name (`VOLUME_UUID`).

3. In the row for the backup that you want to delete, click the
   **more actions** menu, and then click **Delete**.

4. In the confirmation dialog, enter `delete`, and then click **Delete**.

For more information, see
[Manage backups in the Google Cloud console](https://docs.cloud.google.com/backup-disaster-recovery/docs/cloud-console/bv-backup-manage.md.txt).

### gcloud

Delete a backup from the backup vault:

```bash
gcloud backup-dr backups delete BACKUP_ID \
    --backup-vault=BACKUP_VAULT_NAME \
    --data-source=DATA_SOURCE_ID \
    --location=VAULT_REGION \
    --project=VAULT_PROJECT_ID
```

Replace the following:

- `BACKUP_ID`: the ID of the backup to delete.
- `BACKUP_VAULT_NAME`: the name of the backup vault.
- `DATA_SOURCE_ID`: the ID of the data source for the ONTAP volume.
- `VAULT_REGION`: the region of the backup vault, such as `us-central1`.
- `VAULT_PROJECT_ID`: the ID of the project that contains the backup vault.

## What's next

- [Restore a NetApp ONTAP volume from a backup vault](https://docs.cloud.google.com/backup-disaster-recovery/docs/netapp-volumes/netapp-ontap-restore.md.txt)
- [Manage data sources in the Google Cloud console](https://docs.cloud.google.com/backup-disaster-recovery/docs/cloud-console/backup-datasource-manage.md.txt)
- [Manage backups in the Google Cloud console](https://docs.cloud.google.com/backup-disaster-recovery/docs/cloud-console/bv-backup-manage.md.txt)
- [Monitor jobs](https://docs.cloud.google.com/backup-disaster-recovery/docs/monitor-reports/monitor-jobs-console.md.txt)
- [Edit a backup plan for vaulted backups](https://docs.cloud.google.com/backup-disaster-recovery/docs/cloud-console/backup-plan-edit.md.txt)