Assigning a Backup Policy to a Volume Group
Learn how to assign a backup policy to a volume group.
If a volume group has an assigned backup policy, you must remove any backup policy assignments from volumes before you can add them to the volume group.
Before you can assign a backup policy to an existing volume group containing one or more volumes with assigned backup policies, you must remove those policy assignments from the individual volumes.
- On the Volume Groups list page, select the volume group you want to assign a backup policy to. If you need help finding the list page or the volume group, see Listing Volume Groups.
- On the details page, select Edit.
- Select Next until the Backup Policies section is displayed.
-
In the Backup Policies section, select the compartment containing the backup policies.
-
Select the appropriate backup policy for your requirements.
- Optionally, if you select a backup policy enabled for cross region backup copies, you can encrypt the backup copy in the destination region with your own Vault encryption key by selecting Encrypt using customer-managed keys for Cross region backup copy encryption. If you select this option, you must specify the OCID for a valid encryption key in the destination region, see Customer-Managed Encryption Keys for Cross-Region Operations.
-
Select Next, and then Save changes.
Use the
oci bv volume-backup-policy-assignment create
command and specify the--asset-id
and--policy-id
parameters to assign the policy to the volume backup group:oci bv volume-backup-policy-assignment create --asset-id <volume_group_ID> --policy-id <policy_ID> --xrc-kms-key-id <kms_key_ID>
For example:
oci bv volume-backup-policy-assignment create --asset-id ocid1.volumegroup.oc1..<unique_ID> --policy-id ocid1.volumebackuppolicy.oc1..<unique_ID> --xrc-kms-key-id ocid1.key.oc1.iad-ad-1.<unique_ID>
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Run the CreateVolumeBackupPolicyAssignment operation and specify the assetId and policyId attributes in the CreateVolumeBackupPolicyAssignmentDetails resource to assign the policy to the volume group backup.