All Products
Search
Document Center

Object Storage Service:Use Data Online Migration to migrate data between accounts

Last Updated:Aug 02, 2023

You can use the Data Online Migration feature of Alibaba Cloud Data Transport to migrate data from Bucket A owned by Alibaba Cloud Account A to Bucket B owned by Alibaba Cloud Account B. The buckets can be located in the same region or in different regions.

Important Data Online Migration is free of charge. However, you are charged for the API requests and traffic that are used to upload or download data during the migration process. For more information, see Billing.

Prerequisites

  • RAM users

    The following RAM users are created: RAM User A that belongs to Alibaba Cloud Account A and RAM User B that belongs to Alibaba Cloud Account B. For more information, see Create a RAM user.

  • AccessKey pairs

    AccessKey pairs are created for RAM User A and RAM User B and recorded for later use. For more information, see Create an AccessKey pair.

  • Authorization

    The AliyunOSSFullAccess and AliyunMGWFullAccess policies are attached to RAM User A and RAM User B. For more information, see Grant permissions to RAM users.

Migrate data across Alibaba Cloud accounts and regions

Assume that Bucket A is located in the China (Shanghai) region and that Bucket B is located in the China (Hangzhou) region. To migrate data from Bucket A to Bucket B by using the public endpoints of the buckets, perform the following steps:

Important When you migrate data across Alibaba Cloud accounts and regions, you can use only the public endpoints of the source and destination buckets.
  1. Create a source data address.
    1. Log on to the Alibaba Cloud Data Transport console.
    2. In the left-side navigation pane, choose Data Online Migration > Data Address. On the page that appears, click Create Data Address.
    3. In the Create Data Address panel, configure the parameters. The following table describes the parameters.
      ParameterDescription
      Data TypeSelect OSS.
      Data RegionSelect China (Shanghai).
      Data NameEnter migrationtask1 in this example.
      Enable Transfer AccelerationDo not select this check box.
      OSS EndpointSelect https://oss-cn-shanghai.aliyuncs.com. For more information about Object Storage Service (OSS) endpoints, see Regions and endpoints.
      AccessKey IdEnter the AccessKey ID of RAM User A.
      AccessKey SecretEnter the AccessKey secret of RAM User A.
      OSS BucketSelect Bucket A.
      OSS PrefixLeave this parameter empty to migrate all data in the bucket.
  2. Create a destination data address.
    1. In the left-side navigation pane, choose Data Online Migration > Data Address. On the page that appears, click Create Data Address.
    2. In the Create Data Address panel, configure the parameters. The following table describes the parameters.
      ParameterDescription
      Data TypeSelect OSS.
      Data RegionSelect China (Hangzhou).
      Data NameEnter migrationtask2 in this example.
      Enable Transfer AccelerationDo not select this check box.
      OSS EndpointSelect https://oss-cn-hangzhou.aliyuncs.com.
      AccessKey IdEnter the AccessKey ID of RAM User B.
      AccessKey SecretEnter the AccessKey secret of RAM User B.
      OSS BucketSelect Bucket B.
      OSS PrefixLeave this parameter empty to migrate all data in the bucket.
  3. Create a migration job.
    1. In the left-side navigation pane, choose Data Online Migration > Migration Jobs. On the page that appears, click Create Job.
    2. In the Create Job panel, read the terms of the migration service and select I agree to the above terms and activate the Data Transport service. Then, click Next.
    3. In the Fee Reminder message, click Yes, Go Ahead.
    4. In the Job Config step, configure the following parameters, retain the default settings for the other parameters, and then click Next.
      ParameterDescription
      Job NameEnter the name of the migration job. In this example, enter Task2.
      Source Data AddressSelect the created source data address. In this example, select [oss]migrationtask1.
      Destination Data AddressSelect the created destination data address. In this example, select [oss]migrationtask2.
      Migration TypeSelect Full.
    5. In the Data Prediction section of the Performance step, configure the Data Size and File Count parameters.
    6. In the Performance step, go to the Flow Control section, specify the Time Range and Max Flow parameters, and then click Add.
    7. Click Create.

Migrate data across Alibaba Cloud accounts within the same region

Assume that Bucket A and Bucket B are located in the China (Shanghai) region. To migrate data from Bucket A to Bucket B by using the internal endpoints of the buckets, perform the following steps:

Important When you migrate data across Alibaba Cloud accounts within the same region, we recommend that you use the internal endpoints of the source and destination buckets. If you use the public endpoints of the buckets, you are charged for the outbound traffic over the Internet.
  1. Create a source data address.
    1. Log on to the Alibaba Cloud Data Transport console.
    2. In the left-side navigation pane, choose Data Online Migration > Data Address. On the page that appears, click Create Data Address.
    3. In the Create Data Address panel, configure the parameters. The following table describes the parameters.
      ParameterDescription
      Data TypeSelect OSS.
      Data RegionSelect China (Shanghai).
      Data NameEnter migrationtask1 in this example.
      Enable Transfer AccelerationDo not select this check box.
      OSS EndpointSelect https://oss-cn-shanghai-internal.aliyuncs.com. For more information about OSS endpoints, see Regions and endpoints.
      AccessKey IdEnter the AccessKey ID of RAM User A.
      AccessKey SecretEnter the AccessKey secret of RAM User A.
      OSS BucketSelect Bucket A.
      OSS PrefixLeave this parameter empty to migrate all data in the bucket.
  2. Create a destination data address.
    1. In the left-side navigation pane, choose Data Online Migration > Data Address. On the page that appears, click Create Data Address.
    2. In the Create Data Address panel, configure the parameters. The following table describes the parameters.
      ParameterDescription
      Data TypeSelect OSS.
      Data RegionSelect China (Shanghai).
      Data NameEnter migrationtask2 in this example.
      Enable Transfer AccelerationDo not select this check box.
      OSS EndpointSelect https://oss-cn-shanghai-internal.aliyuncs.com.
      AccessKey IdEnter the AccessKey ID of RAM User B.
      AccessKey SecretEnter the AccessKey secret of RAM User B.
      OSS BucketSelect Bucket B.
      OSS PrefixLeave this parameter empty to migrate all data in the bucket.
  3. Create a migration job.
    1. In the left-side navigation pane, choose Data Online Migration > Migration Jobs. On the page that appears, click Create Job.
    2. In the Create Job panel, read the terms of the migration service and select I agree to the above terms and activate the Data Transport service. Then, click Next.
    3. In the Fee Reminder message, click Yes, Go Ahead.
    4. In the Job Config step, configure the following parameters, retain the default settings for the other parameters, and then click Next.
      ParameterDescription
      Job NameEnter the name of the migration job. In this example, enter Task2.
      Source Data AddressSelect the created source data address. In this example, select [oss]migrationtask1.
      Destination Data AddressSelect the created destination data address. In this example, select [oss]migrationtask2.
      Migration TypeSelect Full.
    5. In the Data Prediction section of the Performance step, configure the Data Size and File Count parameters.
    6. In the Performance step, go to the Flow Control section, specify the Time Range and Max Flow parameters, and then click Add.
    7. Click Create.

FAQ

Is the source data retained after data is migrated to the destination address?

When you use Data Online Migration to migrate data, Data Online Migration only reads data from the source address. The source data is not modified or deleted.

How do I migrate an object if another object with the same name already exists in the destination address?

You can use one of the following methods to migrate data based on your business scenario:

  • Directly overwrite or skip the object with the same name.
  • Determine whether to overwrite or skip the object with the same name based on the object metadata such as the last modified time, object sizes, and object Content-Type.

References

Other scenarios for data migration across accounts

  • Migrate specified data

    The preceding procedures provide examples on how to migrate all the data in a bucket. You can also migrate a portion of the data in a bucket. For example, you can migrate objects whose names contain a specific prefix by specifying the prefix when you create a source data address.

  • Migrate incremental data

    If the source data is changed after a full migration of the source bucket, you can specify a migration interval and the number of times to perform incremental data migration. This ensures that the incremental data in the source bucket is migrated from the source data address to the destination data address.

For more information about how to meet your data migration requirements, see Migrate data.

Migrate data within an account

For more information about how to migrate data within an Alibaba Cloud account, see Use CRR or SRR to migrate OSS data owned by the same Alibaba Cloud account.