Help Center/ Object Storage Service/ User Guide/ Data Management/ Data Replication/ Same-Account, Cross-Region Replication Using OBS
Updated on 2026-09-23 GMT+08:00

Same-Account, Cross-Region Replication Using OBS

Scenarios

Cross-region replication within an account allows you to define replication rules that 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.

This section describes how to replicate data between buckets of the same account across regions using OBS Console, OBS APIs, or obsutil.

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

Replication content: object content, metadata (object name, size, last modification time, creator, version ID, and user-defined metadata), ACL, and storage class (under the 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

You can use cross-region replication within an account to meet the following requirements:

  • Compliance requirements

    OBS stores data across geographically distant AZs by default, but some compliance standards may require even greater separation. In such cases, you can use cross-region replication to meet compliance 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

    For security and availability purposes, 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.

  • Easy maintenance

    If you have compute clusters in two different OBS regions that need to analyze the same set of objects, you can maintain object replicas in both regions.

OBS helps you replicate your service data stored in OBS to a specified region. However, Huawei Cloud does not have visibility into your data and is not responsible for ensuring the legal compliance of your use of OBS. If your replication involves cross-border transfer, ensure that your use complies with relevant laws and regulations.

Constraints

Table 1 Constraints on same-account, cross-region replication

Item

Description

Bucket version

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

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

Functions

  • Objects in the Archive, or Deep Archive storage class cannot be replicated.
  • If the destination bucket's region does not support storage classes, all replicated objects are stored in the Standard storage class.
  • OBS supports replication only between one source bucket and one destination bucket. Replication from a single source bucket to multiple destination buckets is not supported. You can change the destination bucket, but doing so updates the destination bucket for all existing rules.
  • Cross-region replication does not replicate appendable objects.
  • A source bucket can have either a single cross-region replication rule that applies to all objects in the bucket, or up to 100 rules that apply to objects with specified prefixes.
  • Objects encrypted with SSE-C cannot be replicated across regions.

Time

Cross-region replication is not real-time. After you configure a replication rule, objects may not be replicated immediately. Please wait patiently.

Region

  • The source and destination buckets must be in two different regions.
  • The source and destination regions support replication with 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 existing 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 avoid making changes until the synchronization of existing objects is complete.
  • If an object replicated to the destination bucket is deleted and a new replication rule that allows replication of existing objects is configured within three days of the deletion, the same version of the deleted object will not be replicated to the destination bucket again.

    For example, you first configure cross-region replication rule 1 to replicate the current version of object test.txt from the source bucket to the destination bucket. Later, you delete test.txt from the destination bucket and delete rule 1. Two days afterward, you create cross-region replication rule 2 that allows replication of existing objects. In this case, test.txt will not be replicated to the destination bucket again.

Versioning

  • The source and destination buckets must have the same versioning status (enabled or disabled). If you change the versioning status after cross-region replication has been configured, any updates made when the source and destination buckets have inconsistent versioning statuses cannot be replicated. After versioning is enabled, it can only be suspended and cannot be disabled. Therefore, exercise caution when changing the versioning status while using replication rules.
  • If versioning is enabled or suspended for both the source and destination buckets and the cross-region replication rule is enabled, deleting an object in the source bucket without specifying its version will also delete the object in the destination bucket.
  • If you change the versioning status of the destination bucket while cross-region replication is enabled, object replication will fail. 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 the read/write permissions of the source or destination bucket are incorrect and the system cannot read source objects or write to the destination bucket, the affected objects will fail to replicate. Even after the permissions are corrected, these objects will not be replicated again.
  • Do not delete or overwrite object replicas in the destination bucket, or modify their ACLs. Doing so may cause inconsistencies in the latest object versions or permission settings between the source and destination buckets.

Tags

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

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 replicate data from bucket A to bucket B or vice versa. However, replicas in either bucket cannot be replicated again.
  • If BlockPublicAcls is enabled for the destination bucket but the ACLs of objects in the source bucket allow public access, cross-region replication will fail because of ACL conflicts.
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 creation may fail.
  • If the cross-region replication rule is enabled but the function of synchronizing existing objects is disabled, there is a delay of about 5 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 with 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

Billing Mode

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.

  • For non-multipart objects, replicating an object creates a GET request to the source bucket and a PUT request to the destination bucket; deleting an object from the source bucket creates a DELETE request to the destination bucket.
  • For multipart objects, replicating each part creates a GET request to the source bucket and a PUT request to the destination bucket.
  • Modifying a replicated source object's ACL automatically synchronizes the change to the destination object.
    NOTE:

    Because the source bucket initiates this ACL replication, it incurs the resulting PUT request charges.

For details about request billing, see Requests.

Pay-per-use

Data transfer

Traffic generated when you replicate data from the source bucket to the destination bucket in another region. Billing only applies to the data transferred out of the source bucket.

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.

NOTE:

Cross-account, cross-region replication does not support SSE-KMS-encrypted objects.

Pay-per-use

Storage space

Space occupied by the replicated objects 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.

Pay-per-use

Resource packages

Synchronize existing objects

Requests

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

Billing applies to the number of objects that are successfully replicated. You are also billed for listing the existing objects.

Pay-per-use

Data transfer

Traffic generated when OBS replicates existing objects to the destination bucket in another region. Billing only applies to the data transferred out of the source bucket.

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.

Pay-per-use

Storage space

Space occupied by the replicated objects 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.

Pay-per-use

Resource packages

Prerequisites

  • There is a source bucket in a region of an account. The bucket version is 3.0 or later, and the bucket region supports cross-region replication.
  • There is a destination bucket in another region of the same account. To create a bucket, see Creating a Bucket.

Creating a Same-Account, Cross-Region Replication Rule

You can use OBS Console, APIs, or obsutil to configure same-account, cross-region replication. You cannot use SDKs or OBS Browser+ to do so.

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

You can use OBS Console or APIs to manage cross-region replication rules. You cannot use SDKs, OBS Browser+, or obsutil to do so.

References