Enabling Cross-Region Replication When Updating an Existing Block Volume
Learn how to enable cross-region replication for an existing block volume
Use the steps described in this procedure to enable replication on an existing volume. You can also enable replication when you create a volume, see Creating a Block Volume.
- On the Block Volumes list page, select the volume you want enable cross-region replication for. If you need help finding the list page, see Listing Volumes.
- On the details page, select Edit.
- In the Cross/ad region replication section, move the Enable cross ad/region replication slider to the right to enable cross-region replication.
- Select the target region for the replica.
- Select the availability domain for the replica.
- Enter a name for the replica.
- Select Confirm to acknowledge the cost warning.
-
Optionally, encrypt the volume replica in the destination region by using your own Vault encryption key. In the Cross ad/region replica encryption section, select Encrypt using customer-managed keys , and then specify the OCID for a valid encryption key in the region you selected to replicate the volume to. For more information, see Customer-Managed Encryption Keys for Cross-Region Operations.
-
Select Save changes.
Use the
oci bv volume update
command and specify the--volume-id
,"displayName"
,"availabilityDomain"
and"xrrKmsKeyId"
parameters to enable cross-region replication when updating an existing block volume:oci bv volume update --volume-id <volume_ID> --block-volume-replicas '[{"displayName":"<display_name>","availabilityDomain":"<availability-domain_ID>","xrrKmsKeyId" : "<kms_key_ID>"}]'
For example:
oci bv volume update --volume-id ocid1.volume.oc1.phx.<unique_ID> --block-volume-replicas '[{"displayName":"Sample_Replica","availabilityDomain":"pjBI:US-ASHBURN-AD-1","xrrKmsKeyId" : "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
UpdateVolume
operation and specify theblockVolumeReplicas
attribute in theUpdateVolumeDetails
resource to enable cross-region replication for an existing block volume.