All Products
Search
Document Center

Object Storage Service:Use data replication to migrate OSS data owned by the same Alibaba Cloud account

Last Updated:Apr 19, 2024

Data replication allows you to migrate data between buckets that are located in the same region or different regions and owned by the same Alibaba Cloud account. To migrate data across regions, you can use the cross-region replication (CRR) feature. To migrate data within the same region, you can use the same-region replication (SRR) feature.

Usage notes

  • Data replication starts three to five minutes after the replication rule is configured.

  • CRR and SRR replicate data asynchronously (in near real time). The time required to complete data replication ranges from minutes to hours based on the amount of data to replicate.

  • When historical data is migrated, objects in the source bucket may overwrite objects in the destination bucket if these objects have the same names. To avoid overwriting same-name objects, we recommend that you enable versioning for the source and destination buckets. For more information about how to enable versioning, see Configure versioning.

  • If you do not want to migrate incremental data in the source bucket after existing data in the source bucket is migrated, you can disable the data replication rule. After the data replication rule is disabled, the migrated data is stored in the destination bucket, and the incremental data in the source bucket is not replicated to the destination bucket.

For more information about CRR, see CRR overview. For more information about SRR, see SRR overview.

Data migration between buckets in different regions

For example, you can use the following steps to migrate all data from Bucket A in the China (Beijing) region to Bucket B in the China (Hangzhou) region without replicating KMS-encrypted objects:

  1. Log on to the OSS console.

  2. In the left-side navigation pane, click Buckets. On the Buckets page, click Bucket A.

  3. In the left-side navigation tree, choose Data Management > CRR.

  4. On the CRR tab, click CRR.

  5. In the CRR panel, configure parameters described in the following table.

    Parameter

    Description and example

    Source Bucket

    The region and name of the source bucket. In this example, the region is China (Beijing) and the name is Bucket A.

    Destination Bucket

    Select China (Hangzhou) and Bucket B.

    Objects to Replicate

    Select All Objects in Source Bucket.

    Replication Policy

    Select Add/Change. OSS synchronizes the add and change operations on the source bucket to the destination bucket.

    Replicate Historical Data

    Select Yes.

    Replicate Objects Encrypted based on KMS

    Select No.

    RAM Role Name

    Create a role or use the AliyunOSSRole role to run replication tasks.

    RTC

    Specify whether to enable replication time control (RTC) based on your business requirements.

  6. Click OK.

    The data replication progress is displayed on the CRR tab.

Data migration between buckets in the same region

For example, you can use the following steps to migrate all data from Bucket C in the China (Beijing) region to Bucket D in the same region without replicating KMS-encrypted objects:

  1. Log on to the OSS console.

  2. In the left-side navigation pane, click Buckets. On the Buckets page, click Bucket C.

  3. In the left-side navigation tree, choose Data Management > SRR.

  4. On the SRR tab, click SRR.

  5. In the SRR panel, configure parameters described in the following table.

    Parameter

    Description and example

    Source Bucket

    The region and name of the source bucket. In this example, the region is China (Beijing) and the name is Bucket C.

    Destination Bucket

    Select China (Beijing) and Bucket D.

    Objects to Replicate

    Select All Objects in Source Bucket.

    Replication Policy

    Select Add/Change. OSS synchronizes the add and change operations on the source bucket to the destination bucket.

    Replicate Historical Data

    Select Yes.

    Replicate Objects Encrypted based on KMS

    Select No.

    RAM Role Name

    Create a role or use the AliyunOSSRole role to run replication tasks.

  6. Click OK.

    The data replication progress is displayed on the SRR tab.

References

You can migrate data between buckets that are owned by different Alibaba Cloud accounts. For more information, see Use Data Online Migration to migrate data between accounts.