This topic describes how to prepare for a migration job.

Network resources

  • Estimate the amount of data to be migrated.
    Estimate the size and the number of files that you want to migrate.
    Note To make sure that your data can be migrated as expected, you must enter an appropriate size and number of files when you create a migration job.
  • Load network resources.
    1. Create a list file on your on-premises device.
      The list file consists of two columns. Separate the columns with a tab character (\t). Each line represents one file. Separate files with line feeds (\n).
      • The first column includes a list of HTTP or HTTPS URLs. Data Transport uses HTTP GET requests to download files from the HTTP or HTTPS URLs and uses HTTP HEAD requests to obtain metadata of the files.
      • The second column includes a list of file names. After a file is migrated, the name of the object that corresponds to the file consists of a prefix and the file name. If a file name contains Chinese characters or special characters such as spaces and tab characters, you must encode the URL.
        • If a file name contains symbols, you must encode the URL and the file name. For example, a file is named #¥.jpg. After the file name is encoded, it is displayed as #%EF%BF%A5.jpg. Use the following information to specify the file in the list file:
          http://docs-aliyun.cn-hangzhou.oss.aliyun-inc.com/pics/#%EF%BF%A5.jpg    pics/#%EF%BF%A5.jpg
        • If a file name contains Chinese characters, you must encode only the URL. Do not change the file name. For example, a file is named <a Chinese file name>.jpg. After the file name is encoded, it is displayed as %e5%9b%be%e7%89%87.jpg. Use the following information to specify the file in the list file:
          http://docs-aliyun.cn-hangzhou.oss.aliyun-inc.com/pics/%e5%9b%be%e7%89%87.jpg    pics/<a Chinese file name>.jpg
      Notice
      • You must specify specific files instead of file folders in the list file.
      • If your device runs on a Windows operating system, we recommend that you use a text editor such as EditPlus or Sublime Text instead of Notepad to edit the list file. If your device runs on a Linux operating system, we recommend that you use Vi IMproved (Vim) to edit the list file.

      The following example shows the content of a list file named list.txt:

      http://docs-aliyun.cn-hangzhou.oss.aliyun-inc.com/docs/my.doc    docs/my.doc
      http://docs-aliyun.cn-hangzhou.oss.aliyun-inc.com/pics/my.jpg    pics/my.jpg
      http://docs-aliyun.cn-hangzhou.oss.aliyun-inc.com/pics/#%EF%BF%A5.jpg    pics/#%EF%BF%A5.jpg
      http://docs-aliyun.cn-hangzhou.oss.aliyun-inc.com/pics/%e5%9b%be%e7%89%87.jpg    pics/<a Chinese file name>.jpg
    2. Upload the list file to Object Storage Service (OSS). For more information, see Simple upload.
      Note
      • After the list file is uploaded to OSS, the online migration service downloads the list file and migrates the files based on the specified URLs.
      • When you create a migration job, the OSS URL of a list file is in the oss://{bucket name}/{list file name} format, such as oss://mybucket/list.txt.

Alibaba Cloud OSS

  • Create a destination OSS bucket.

    Create a destination bucket to store the migrated data. For more information, see Create buckets.

  • Create a Resource Access Management (RAM) user and grant required permissions to the RAM user.
    1. Log on to the RAM console.
    2. In the left-side navigation pane, choose Identities > Users.
    3. On the Users page, click Create User.
    4. On the Create User page, specify Logon Name and Display Name in the User Account Information section.
    5. In the Access Mode section, select Console Access and OpenAPI Access. Then, save the generated logon name, password, AccessKey ID, and AccessKey secret.
      1. Console Access: If you select this option, you must configure the console password, password reset settings, and multi-factor authentication settings.
      2. OpenAPI Access: If you select this option, an AccessKey pair is automatically created for the RAM user. The RAM user can call API operations or use other development tools to access Alibaba Cloud resources.
    6. After the RAM user is created, return to the Users page. Find the RAM user and click Add Permissions in the Actions column. In the panel that appears, select the AliyunOSSFullAccess and AliyunMGWFullAccess policies and click OK. This way, the RAM user is granted the permissions to read and write files from OSS and perform online data migrations.
    7. In the left-side navigation pane, click Overview.
    8. On the page that appears, navigate to the Account Management section and click the link under RAM user logon. On the page that appears, enter the logon name and password of the RAM user to log on to the Alibaba Cloud Management Console.