Creating an Object Storage Replication Policy
Create a replication policy for an Object Storage source bucket.
The Console checks the IAM policies that are in place to perform this task successfully. If you see a policy missing warning, you can let the Console try to create any missing policies or copy the missing policy details to the clipboard to email your administrator. If you have the required policies in place, create the replication policy.
After the policy is created, Replication: Enabled (Source) is added to the bucket information. Objects uploaded to the source bucket after the policy is created are asynchronously replicated to the destination bucket.
Use the oci os replication create-replication-policy command and required parameters to create a replication policy for a bucket:
oci os replication create-replication-policy --bucket-name bucket_name --destination-region destination_region_id --destination-bucket destination_bucket_name [OPTIONS]
For example:
oci os replication create-replication-policy --bucket-name MySourceBucket --destination-region us-ashburn-1 --destination-bucket MyDestinationBucket --name MyReplicationPolicy { "data": { "destination-bucket": "MyDestinationBucket", "destination-region": "us-ashburn-1", "id": "bacb8334-b191-4026-aa65-5e4f5165ae3e", "name": "MyReplicationPolicy", "status": "ACTIVE", "status-message": "The policy is active.", "time-created": "2020-02-06T16:44:10+00:00", "time-last-sync": "2020-02-06T16:44:20+00:00" } }
Objects uploaded to the source bucket after policy creation are asynchronously replicated to the destination bucket.
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Run the CreateReplicationPolicy operation to create a replication policy for a bucket.