Cross-region replication (CRR) enables the automatic and asynchronous (near real-time) replication of objects across buckets in different Object Storage Service (OSS) regions. Operations such as the creation, overwriting, and deletion of objects can be synchronized from a source bucket to a destination bucket.

Background information

When you use CRR, take note of the following items:
  • Billing
    • You are charged for the traffic generated when you use CRR to replicate objects in OSS. For more information about the billing methods, see Traffic fees.
    • Each time an object is synchronized, OSS counts the number of requests, and you are charged for the requests. For more information about the billing methods, see API operation calling fees.
  • Usage notes
    • You can configure CRR rules to synchronize data from a source bucket to multiple destination buckets. You can configure up to 100 CRR rules for a bucket. A bucket can be specified as a source bucket or a destination bucket. If your business requires more than 100 CRR rules for a bucket, contact technical support.
    • The source bucket and destination bucket must be in the same versioning status. The versioning status of the source bucket and destination bucket cannot be changed when data is being synchronized between the two buckets.
For more information about CRR, see Cross-region replication.

Enable CRR

  1. Log on to the OSS console.
  2. In the left-side navigation pane, click Buckets, and then click the name of the bucket for which you want to enable CRR.
  3. In the left-side navigation pane, choose Redundancy for Fault Tolerance > Cross-Region Replication. In the Cross-Region Replication section, click Configure.
  4. Click Cross-Region Replication. In the Cross-Region Replication panel, configure the parameters. The following table describes the parameters.
    Parameter Description
    Source Region The region where the current bucket is located.
    Source Bucket The name of the current bucket.
    Destination Region Select the region where the destination bucket is located.
    Destination Bucket Select the destination bucket to which you want to synchronize data.
    Acceleration Type Only Transfer Acceleration is supported. Transfer acceleration can be used to increase the transfer speed when data is replicated across a region within mainland China and a region outside mainland China. If you enable transfer acceleration, OSS charges transfer acceleration fees. For information about the billing methods, see Transfer acceleration fees.
    Applied To Select the source data that you want to synchronize.
    • All Files in Source Bucket: OSS synchronizes all objects from the source bucket to the destination bucket.
    • Files with Specified Prefix: OSS synchronizes the objects whose names contain the specified prefix from the source bucket to the destination bucket. You can specify up to 10 prefixes.
    Object Tagging Objects that have the specified tags are synchronized to the destination bucket. Select Configure Rules and add tags (key-value pairs). You can add up to 10 tags.

    When you set this parameter, make sure that the following conditions are met:

    • Object tagging is configured. For more information, see Configure object tagging.
    • Versioning is enabled for the source bucket and the destination bucket.
    • Add/Change is set for Operations.
    • If the source region is China (Hangzhou), the destination region can be any region except China (Hangzhou). If the source region is Australia (Sydney), the destination region can be any region outside mainland China.
    Operations Select the synchronization policy.
    • Add/Change: OSS synchronizes the added or changed data from the source bucket to the destination bucket.
    • Add/Delete/Change: OSS synchronizes all data changes such as the creation, overwriting, and deletion of objects from the source bucket to the destination bucket.

    If an object is uploaded to the source bucket by using the multipart upload method, each uploaded part is synchronized to the destination bucket. The complete object obtained by calling CompleteMultipartUpload is also synchronized to the destination bucket.

    For more information about how to configure CRR for objects in versioned buckets, see Cross-region replication in specific scenarios.

    Replicate Historical Data Specify whether to synchronize historical data in the source bucket before you enable CRR for the source bucket.
    • Yes: OSS synchronizes historical data to the destination bucket.
      Notice When historical data is synchronized, objects in the source bucket may overwrite objects in the destination bucket if these objects have the same names. To prevent data loss, we recommend that you enable versioning for the source bucket and the destination bucket.
    • No: OSS synchronizes only objects that are uploaded or updated after the CRR rule takes effect to the destination bucket.
    KMS-based Encryption If KMS-based encryption is configured for the source objects or destination bucket, you must select KMS-based Encryption and configure the following parameters:
    • CMK ID: specifies a customer master key (CMK) used to encrypt the destination object.

      To use a CMK to encrypt objects, you must create a CMK in the same region as the destination bucket in the KMS console. For more information, see Manage CMKs.

    • RAM Role Name: A RAM role is authorized to perform KMS-based encryption on the destination object.
      • New RAM Role: A RAM role is created to perform KMS-based encryption on the destination object. The role name is in the following format: kms-replication-source bucket name-destination bucket name.
      • AliyunOSSRole: The AliyunOSSRole role is used to perform KMS-based encryption on the destination object. If the AliyunOSSRole role does not exist, OSS automatically creates the AliyunOSSRole role when you select this option.
    Note
  5. Click OK.
    • A CRR rule cannot be edited or deleted after it is created.
    • The synchronization starts 3 to 5 minutes after a CRR rule is configured. You can view the synchronization progress by choosing Redundancy for Fault Tolerance > Cross-Region Replication on the overview page of the source bucket.
    • In CRR, data is asynchronously (near real-time) replicated. It takes several minutes to several hours for the data to be replicated to the destination bucket based on the amount of data.

Disable CRR

You can click Disable to disable CRR.

sync

After CRR is disabled, the replicated data is stored in the destination bucket, and the incremental data in the source bucket is not replicated to the destination bucket.