Help Center/ Object Storage Service/ User Guide/ Data Management/ Data Replication/ Cross-Region Replication Within an Account
Updated on 2025-08-26 GMT+08:00

Cross-Region Replication Within an Account

Scenarios

Cross-region replication within an account allows you to create a cross-region replication rule to automatically replicate data from a source bucket in one region to a destination bucket in another region under the same account in near real time. Objects replicated to the destination bucket are exact copies of the objects in the source bucket.

Replication scope: objects with specified prefix or all objects in the bucket

Replicable object data: object name, metadata (object content, size, last modification time, creator, version number, and user-defined metadata), ACL, and storage class (default configuration)

If Change storage class for replicated objects is selected when you create a cross-region replication rule, the storage class of the object copies is different from that of the source objects.

Figure 1 Cross-region replication within an account

Cross-region replication within an account applies to the following scenarios:

  • Regulatory compliance

    OBS stores data across AZs that are relatively far apart from each other, but regulatory compliance may require further distances. Cross-region replication enables you to meet regulatory requirements.

  • Low latency

    The same OBS resources may need to be accessed from different locations. To minimize the access latency, you can use cross-region replication to create object copies in the nearest region.

  • Data replication

    You want to migrate data stored in OBS to the data center in another region.

  • Data backup and disaster recovery

    You want to create explicit backups for all data written to OBS in the data center of another region to ensure data remains available if there is any damage.

  • Ease of maintenance

    You have compute clusters used to analyze the same group of objects in two different OBS regions and may need to maintain object copies in these two regions.

OBS helps you replicate your service data stored in OBS to a specified region, but Huawei Cloud has no access to your data. You need to ensure the legal compliance of your use of OBS on your own. If your replication involves cross-border transfer, ensure that your use complies with relevant laws and regulations.

Constraints

Table 1 Constraints on cross-region replication within an account

Item

Description

Bucket version

Only buckets whose version is 3.0 or later support cross-region replication.

The version of a bucket can be viewed in the Basic Information area of the bucket's Overview page on OBS Console. For details, see Viewing Bucket Information.

Functions

  • If objects in the source bucket are in the Archive, or Deep Archive storage class, they cannot be replicated to the destination bucket.
  • If the destination region does not support a specific storage class, object copies will be stored in the Standard storage class.
  • 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.
  • Cross-region replication does not replicate appendable objects.
  • A source bucket can have only one cross-region replication rule that is applied to all objects in the bucket, or it can have up to 100 rules that are applied to objects with the specified prefix.
  • Objects encrypted using SSE-C cannot be replicated across regions.

Time

A cross-region replication rule may not take effect immediately upon its configuration. Accordingly, the objects that this rule is applied to may not be replicated immediately after the rule is configured.

Area

  • The source and destination buckets must be in two different regions.
  • Before replicating data, ensure that the source and destination regions can have their data replicated from each other. Figure 2 lists the supported regions. "√" indicates that data can be replicated between regions. "x" indicates that data cannot be replicated between regions.

Synchronization of historical objects

  • By default, objects uploaded before cross-region replication is enabled are not replicated to the destination bucket unless the function for synchronizing existing objects is enabled.
  • Modifying cross-region replication settings may prevent existing objects from being replicated, so do not make modifications before the synchronization of existing objects is complete.

Versioning

  • The versioning status (enabled or disabled) of the source bucket must be the same as that of the destination bucket.
  • If versioning is enabled or suspended for both the source and destination buckets and cross-region replication is also enabled for both buckets, deleting an object without specifying its version in the source bucket will also delete the object in the destination bucket.
  • For an enabled cross-region replication rule, if you change the versioning status of the destination bucket, the replication of objects will fail. If you want to change the versioning status of the source bucket, delete the replication configuration first, and then make the change.

Access control

  • Bucket owners must have the read and write permissions for both source and destination buckets for successful replication. If OBS does not have permission to read source objects or write destination objects, objects cannot be replicated successfully. Even if OBS is granted required permissions later, the replication will not be resumed.
  • Do not delete or overwrite object copies in a destination bucket or modify their ACLs. Doing so may result in inconsistent latest object versions and access control settings between the destination and source buckets.
  • After a replication with Synchronize Existing Objects enabled is complete, if the replication policy keeps unchanged, any ACL changes of source objects will be synchronized to object copies. However, ACL changes of source historical objects will not be synchronized to the copies of historical objects.

Tags

A cross-region replication rule will not replicate tags applied to the source bucket and objects to the destination bucket and objects.

Others

  • Objects in a source bucket can be replicated to only one destination bucket, and cannot be replicated further from that 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 anymore.
  • If you delete the OBS agency for an enabled cross-region replication rule, the object replication will be in the FAILED status.
  • If BlockPublicAcls is enabled for the destination bucket but the ACL of source bucket allows public access, cross-region replication will fail because of ACL conflicts.
  • Objects deleted based on lifecycle rules in the source bucket will not be synchronously deleted from the destination bucket.

    For example, you created a cross-region replication rule on January 16 to replicate objects a.txt and aa.txt from source bucket A to destination bucket B. On January 20, a.txt was deleted from source bucket A based on the lifecycle rule. In this case, the a.txt file in the bucket B would not be deleted.

Figure 2 Replication between regions

Important Notes

  • After a bucket is created, you are advised to wait at least 5 minutes before creating a cross-region replication rule for the bucket, or the rule may fail to be created.
  • If the cross-region replication rule is enabled but the function of synchronizing existing objects is disabled, there is a delay of about five minutes to apply the rule. Objects uploaded during that delay may not be replicated.
  • If the cross-region replication rule and the function of synchronizing existing objects are both enabled, existing objects will be replicated 5 minutes later.
  • Objects encrypted using server-side encryption (including SSE-KMS and SSE-OBS) can be replicated. The replication traffic cost is calculated based on the length of the plaintext for SSE-KMS and SSE-OBS. For details, see Billing for Cross-Region Replication Within an Account.

Billing for Cross-Region Replication Within an Account

Figure 3 shows the items that will be billed when data is replicated from one region to another.

Figure 3 Items billed for cross-region replication
Table 2 Billing for cross-region replication

Action

Billing Item

Description

Replicate data across regions

Requests

You are billed for the number of successfully replicated objects. Successfully replicating one object creates a copy request. For details, see Copying Objects.

To learn about the request billing, see Requests.

Data transfer

You are billed for the amount of data transferred from one region to another.

If objects are encrypted using server-side encryption, the cost of their cross-region replication traffic is calculated based on the length of the plaintext for SSE-KMS and SSE-OBS.

Storage space

Storage space occupied by objects stored in the destination bucket.

If you have specified another storage class for object copies in the destination bucket, these copies are billed based on the new storage class.

If objects are encrypted using server-side encryption, their storage cost is calculated based on the length of the ciphertext.

Synchronize existing objects

Requests

You are billed for the number of existing objects that are successfully replicated to the destination bucket.

With synchronization of existing objects enabled, OBS synchronously replicates the objects that already exist in the bucket before a cross-region replication rule is created to the destination bucket.

Data transfer

You are billed for the traffic generated when OBS synchronizes objects across regions.

If historical objects are encrypted using server-side encryption, the cost of their cross-region replication traffic is calculated based on the length of the plaintext for SSE-KMS and SSE-OBS.

Storage space

Storage space occupied by objects stored in the destination bucket.

If you have specified another storage class for object copies in the destination bucket, these copies are billed based on the new storage class.

If historical objects are encrypted using server-side encryption, their storage cost is calculated based on the length of the ciphertext.

Prerequisites

  • A source bucket has been created in a region of an account. The version of the source bucket is 3.0 or later, and cross-region replication is available in the region of the source bucket. For details about the support for cross-region replication in each region, search for "cross-region replication" on the Function Overview page.
  • A destination bucket has been created in another region of the same account. To create a bucket, see Creating a Bucket.

Creating a Rule for Cross-Region Replication Within an Account

You can use OBS Console, APIs, or obsutil to configure cross-region replication within an account.

Modifying, Disabling, Enabling, or Deleting a Cross-Region Replication Rule

You can use OBS Console or APIs to manage cross-region replication rules.

References