tencent cloud


Setting Cross-Bucket Replication

Last updated: 2022-10-12 16:27:26


    Cross-bucket replication enables the automatic async replication of incremental objects from a source bucket to a destination bucket in another region. During replication, COS may also automatically replicate the object operations in the source bucket, such as PUT Object or DELETE Object. You can choose to enable or disable this feature as needed. For more information, see Overview.


    Before enabling cross-bucket replication, make sure that both the source and destination buckets have enabled Versioning.


    Enabling cross-bucket replication

    1. Log in to the COS console.
    2. On the left sidebar, click Bucket List.
    3. Click the name of the desired source bucket to enter the bucket details page.
    4. Click Fault Tolerance and Disaster Recovery > Cross-Bucket Replication on the left.
    5. In the Cross-Bucket Replication column, click Add Rule.
    6. In the pop-up window, configure the cross-bucket replication rule and click OK.

      If versioning is not enabled for both the source and destination buckets, enable it first and then configure the cross-bucket replication rule.

      The configuration items are as described below:
      Configuration ItemDescription
      Source RegionThe region where your source bucket resides.
      Apply ToIndicates which objects will be replicated from the source bucket. The default option is **The whole bucket**. If a prefix is specified, only objects with this prefix will be replicated, such as files prefixed with `logs/`.
      Resource PathPath of your source bucket.
      Destination BucketThe bucket to store the replicated objects. It can be in the same region as the source bucket. You can select only one bucket under the current account in each region.
      Destination Storage ClassStorage class of the replicas. The storage class will be the same as that of the source objects by default. You can also select a different storage class.
      Sync Delete MarkerIf you try to delete an object from a versioning-enabled bucket without specifying a version ID, COS will add a delete marker to the object. If you select this option, cross-bucket replication will copy this delete marker to the destination bucket. Regardless of whether the delete marker is copied, the object will not be deleted from the destination bucket. You can always access a noncurrent version of the object by specifying its version ID. For more information, see Overview.

    • Once the rule is created, you can enable/disable it under Status, or edit it under Operation.
    • If you set Apply To to The whole bucket in your first rule, you will be unable to add any new rules. In this case, you can choose to edit it, or simply delete it and add a new one.
    • If you set Apply To to Specific resources in your first rule, you can edit it and change this setting to The whole bucket as needed.

    Disabling cross-bucket replication

    You can disable a cross-bucket replication rule by using either of the following options:

    • Status: Switch this button off. cross-bucket replication will be disabled temporarily. Copied data will be retained in the destination bucket but no more incremental data will be copied from the source bucket while replication is paused. To re-enable cross-bucket replication, simply switch this button back on.
    • Delete Rule: Delete an existing rule by clicking Delete under Operation. Copied data will be retained in the destination bucket but no more incremental data will be copied from the source bucket. To re-enable cross-bucket replication, you need to add a new rule.

    • When cross-bucket replication is disabled, cross-bucket replication operations in progress cannot proceed and will be aborted.
    • When cross-bucket replication is re-enabled for a bucket, it only applies to objects created after that time point.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support