Note:
- This tutorial requires access to Oracle Cloud. To sign up for a free account, see Get started with Oracle Cloud Infrastructure Free Tier.
- It uses example values for Oracle Cloud Infrastructure credentials, tenancy, and compartments. When completing your lab, substitute these values with ones specific to your cloud environment.
Configure Object Storage cross-region replication for Disaster Recovery
Introduction
Oracle Cloud Infrastructure Object Storage is an internet-scale, high-performance storage platform that offers reliable and cost-efficient data durability. The Object Storage service can store an unlimited amount of unstructured data of any content type, including analytic data and rich content, like images and videos.
Object Storage is a regional cloud service. Buckets are logical containers created in a tenancy inside a region in which customer data is stored as objects.
You can store a copy of all objects from one bucket in another bucket located inside a different region for redundancy. This copy can help you recover from a disaster that could affect an entire cloud region. Cross-region object replication provides protection from a regional outage.
Objective
To configure Object Storage cross-region replication for Disaster Recovery.
Prerequisites
- Configure the required Oracle Identity and Access Management (IAM) policies to replicate objects automatically from one bucket to another in the same region or a different region.
- Authorize the Object Storage service to replicate objects on your behalf.
- Set up the required access to both the source and destination buckets.
- Enable permissions to manage objects in the source and destination buckets.
Configure the IAM policies
-
Log in to the OCI console and click Identity, and then click Policies.
-
Create a new policy and add the following statements:
In this tutorial, we have configured the IAM policies for ‘oci-oss-pms’ group in the compartment ‘ocioss’:
Allow group oci-oss-pms to manage buckets in compartment ocioss Allow group oci-oss-pms to manage objects in compartment ocioss Allow service objectstorage-us-ashburn-1 to manage object-family in compartment ocioss Allow service objectstorage-us-sanjose-1 to manage object-family in compartment ocioss
Task 1: Configure Object Storage cross-region replication
-
Go to the source bucket (for example,
media-bucket
) and click Create Policy as shown in the following image.Note: The destination bucket (for example, bkp-media-bucket) has to be created in the destination region (for example, us-sanjose-1) before setting up replication. Setup replication policy on source bucket by selecting the destination region and bucket to replicate to and then click Create.
-
Select the Destination Region and Destination Bucket for replicating objects and click Create.
Note: In the Bucket Information tab, the Replication field displays Enabled for the source bucket in US East (Ashburn) region.
-
In the US West (San Jose) region, go to the Bucket Information tab and verify if the Replication is Enabled on the destination bucket as well :
Note: Objects uploaded to the source bucket after policy creation are asynchronously replicated to the destination bucket. The time taken for objects to be replicated depends upon the number and size of objects being uploaded or deleted in the source bucket, the available bandwidth between regions, etc.
Task 2: Test Object Storage cross-region replication
-
Upload some objects to the source bucket (
media-bucket
) inUS East (Ashburn)
source region: -
Navigate to the destination region and bucket and confirm that the objects uploaded to the source bucket have been replicated in the destination bucket (
bkp-media-bucket
) inUS West (San Jose)
region.Note: It can take some time for object replication to be triggered and completed.
Next Steps
With this configuration in place, you can have the application active in the primary region with a read-write bucket storing objects. The objects are replicated by OCI Object Storage to the secondary region read-only bucket, where the application can be passive and synchronizing with the primary.
In case of a disaster that impacts access to source bucket, the data replicated to the destination bucket can be accessed for business continuity.
Related Links
Acknowledgments
Author - Ashutosh Mate (Sr. Principal Solutions Architect)
More Learning Resources
Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.
For product documentation, visit Oracle Help Center.
Configure Object Storage cross-region replication for Disaster Recovery
F71738-01
October 2022
Copyright © 2022, Oracle and/or its affiliates.