Help Center> Object Storage Service> Tool Guide (obsutil) (ME-Abu Dhabi Region)> Best Practices> Using obsutil to Replicate Data Across Regions on the Client Side
Updated on 2022-05-18 GMT+08:00

Using obsutil to Replicate Data Across Regions on the Client Side

obsutil client supports cross-region replication. You can directly replicate data from a source bucket to the destination bucket through data streams. The source bucket and destination bucket can be any two OBS buckets. Objects can be replicated between buckets in different regions under the same account or across accounts. The following procedure describes how to replicated data between buckets across accounts and regions:

  1. Run the obsutil config command to configure the AK, SK, and endpoint of the source bucket account.

    obsutil config -interactive -crr

  2. Run the obsutil config command to configure the AK, SK, and endpoint of the destination bucket account.

    obsutil config -interactive

  3. Run the cp command to specify that cross-region replication method is used to copy objects from the source bucket to the destination bucket.

    obsutil cp obs://src-bucket obs://dst-bucket -f -r -crr

  • To use the cross-region replication function, you need to specify the -crr parameter. If this parameter is specified, update the configuration of the client-side cross-region replication in the configuration file. For details, see Updating a Configuration File.
  • The configurations of the source bucket and destination bucket are respectively akCrr/skCrr/tokenCrr/endpointCrr and ak/sk/token/endpoint in the configuration file.
  • The preceding procedure is also applicable to the situation when the source and destination buckets belong to the same account.