Cross-Region Replication Overview

Therefore, cross-region replication provides the capability for data disaster recovery across regions, catering to your needs for off-site data backup.

Cross-region replication refers to the process of automatically and asynchronously replicating data from a bucket (source bucket) to another bucket (destination bucket) across regions by creating a cross-region replication rule. The source bucket and destination bucket must belong to the same account. Replication across accounts is not supported.

For a cross-region replication rule, you can configure it to match a pre-defined object prefix so that objects with the prefix will be replicated. Alternatively, you can configure the rule to apply to the whole bucket so that all objects in the bucket will be replicated. Objects replicated to the destination bucket are precise copies of objects in the source bucket. They have the same object names, metadata, content, size, last modification time, creator, version ID, user-defined metadata, and ACLs. By default, the storage class of the copied object is the same as that of the source object. You can also specify a storage class for the copied object.

Figure 1 Cross-region replication

Contents Replicated

After the cross-region replication rule is enabled, objects that meet the following conditions are copied to the destination bucket:

  • Newly uploaded objects (excluding objects in the Archive storage class)
  • Updated objects. For example, the object content is updated or the ACL information of a copied object is updated.
  • Historical objects in a bucket (The function of synchronizing existing objects must be enabled.)

Application Scenarios

  • The same OBS resources need to be accessed in different locations. To minimize the access latency, you can use cross-region replication to create object copies in the nearest region.
  • Due to business reasons, you need to migrate OBS data to the data center in another region.
  • To ensure data security and availability, you need to create explicit backups for all data written to OBS in the data center of another region. Therefore, secure backup data is available if the source data is damaged irrevocably.

Limitations and Constraints

Cross-region replication has the following limitations and constraints:

  • Currently, only buckets of version 3.0 support cross-region replication. To check the bucket version, go to the Overview page of the bucket on OBS Console. Then you can view the bucket version in the Basic Information area.
  • By default, objects uploaded before cross-region replication is enabled are not copied to the destination bucket unless the function for synchronizing existing objects is enabled.
  • The source bucket and the destination bucket must belong to different regions separately. Data cannot be copied between buckets in the same region.
  • Objects cannot be copied from the source bucket to the destination bucket if they are in the Archive storage class.
  • If the region where the destination bucket resides does not support the storage classes, object copies will be stored in the standard storage class.
  • The versioning status of the source bucket must be the same as that of the destination bucket.
  • Objects in a source bucket can be copied to only one destination bucket, and cannot be copied again from the destination bucket to another bucket. For example, bucket A and bucket B are in two different regions. You can copy data from bucket A to bucket B or the other way round. However, data copies in either bucket A or bucket B cannot be replicated any more.
  • Only when versioning is enabled for both the source and destination buckets, deleting an object from the source bucket without specifying a version will result in the deletion of the object from the destination bucket. In other situations, deletion operations are not synchronized to the destination bucket.
  • If you change the versioning status of the destination bucket when cross-region replication is enabled, the replication of objects will fail. If you want to change the versioning status of the source bucket, disable the cross-region replication first, and then make the change.
  • Ensure that owners of the source and destination buckets have the read and write permissions to the two buckets. Otherwise, data cannot be synchronized. If the system does not have the permissions to read the source bucket or write the destination bucket due to read/write permission errors, objects cannot be copied successfully, and such replication will not be resumed even if the permission error is rectified.
  • For a source bucket, you can create only one cross-region replication rule that applies to the whole bucket for replication of all objects in the bucket. However, you can create a maximum of 100 cross-region replication rules based on object prefixes for the replication of objects that match the prefixes.
  • OBS currently only supports the replication between one source bucket and one destination bucket. Replication from one source bucket to multiple destination buckets is not supported. The destination bucket can be modified. However, modifying the destination bucket will change the destination bucket of all existing rules.
  • If you delete the OBS agency when the cross-region replication is enabled, the replication will be in the FAILED status.
  • Do not delete, overwrite object replicas in the destination bucket, or modify their ACLs, which may cause inconsistency of latest object versions or permission control settings between the destination bucket and the source bucket.
  • If the function for synchronizing existing objects is enabled, modifying the cross-region replication configuration may cause failures in synchronizing existing objects. Therefore, do not modify the cross-region replication configuration before the synchronization finishes.
  • If cross-region replication is enabled, data cannot be added to the end of objects in the source bucket.