Cross-region replication (CRR) provides automatic and asynchronous (near real-time) replication of objects across buckets in different Object Storage Service (OSS) regions. CRR can also synchronize operations such as create, overwrite, and delete operations performed on objects from a source bucket to a destination bucket.

Usage notes

  • Billing
    • You are charged for the traffic that is 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 fees.
    • If you enable transfer acceleration, you are charged for the use of this feature. For more information about the billing methods, see Transfer acceleration fees.
  • Replication time

    In CRR, data is replicated asynchronously. Depending on the amount of data, it can take a few minutes to several hours to replicate data to the destination bucket.

Limits

  • Limits on regions
    • CRR is unavailable in the Philippines (Manila) region. For more information about the regions in which OSS data centers are located, see Regions and endpoints.
    • You must enable transfer acceleration when you perform CRR across regions inside and outside the Chinese mainland.
    • CRR rules based on object tags can be configured only in the following scenarios:
      • The source region is China (Hangzhou), and the destination region is a region except for China (Hangzhou).
      • The source region is Australia (Sydney), and the destination region is a region outside the Chinese mainland and except for Australia (Sydney).
  • Limits on operations
    • You can configure CRR between two unversioned buckets or two versioned buckets.
    • The versioning status of two buckets between which a CRR rule is configured cannot be changed.
    • If you configure a CRR rule for two buckets, an object replicated from the source bucket may overwrite an object that has the same name in the destination bucket.
    • You can configure CRR rules to synchronize data from a source bucket to multiple destination buckets. By default, you can configure up to 100 CRR rules for a bucket. The bucket can be specified as a source bucket or a destination bucket. If you want to configure more than 100 CRR rules for a bucket,contact technical support.

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 Specify the region in which the current bucket is located.
    Source Bucket Specify the name of the current bucket.
    Destination Region Specify the region in which the destination bucket is located.
    Destination Bucket Specify the destination bucket to which you want to synchronize data.
    Acceleration Type Specify the acceleration type. Only Transfer Acceleration is supported. You can use transfer acceleration to accelerate data transfer when you replicate data across regions in the Chinese mainland and outside the Chinese mainland. If you enable transfer acceleration, you are charged for the use of this feature. For more information about the billing methods, see Transfer acceleration fees.
    Applied To Specify 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 Specify the tags of objects that you want to synchronize to the destination bucket. Objects that have the specified tags are synchronized to the destination bucket. Select Configure Rules and add tags in key-value pairs. You can add up to 10 tags.

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

    • Tags are configured for objects. For more information, see Configure object tagging.
    • Versioning is enabled for the source bucket and the destination bucket.
    • The Operations parameter is set to Add/Change.
    • 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 the Chinese mainland except Australia (Sydney).
    Operations Specify the synchronization policy.
    • Add/Change: OSS synchronizes the data changes including the create and overwrite operations on objects from the source bucket to the destination bucket.
    • Add/Delete/Change: OSS synchronizes all data changes including the create, overwrite, and delete operations on objects from the source bucket to the destination bucket.

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

    For more information about how to configure CRR for objects in versioned buckets, see CRR 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 that have the same names in the destination bucket. To prevent data loss, we recommend that you enable versioning for the source and destination buckets.
    • 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) that is used to encrypt the destination object.

      If you want to use a CMK to encrypt objects, you must create a CMK in the same region as the destination bucket in the Key Management Service (KMS) console. For more information, see Create a CMK.

    • RAM Role Name: specifies a RAM role that 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 name of the RAM role 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
    • You can use HeadObject to query the encryption status of the source object and use GetBucketEncryption to query the encryption status of the destination bucket.
    • For more information about how to configure CRR for buckets for which server-side encryption is configured, see CRR in specific scenarios.
  5. Click OK.
    • After you create a CRR rule, the rule cannot be edited or deleted.
    • After you configure a CRR rule, the synchronization task starts in 3 to 5 minutes. To view the synchronization progress, choose Redundancy for Fault Tolerance > Cross-Region Replication on the management page of the source bucket.
    • In CRR, data is replicated asynchronously. Depending on the amount of data, it can take a few minutes to several hours to replicate data to the destination bucket.

Disable CRR

You can click Disable to disable CRR.

sync

After you disable CRR, the replicated data is stored in the destination bucket. However, the incremental data in the source bucket is not replicated to the destination bucket.