This topic describes the precautions and procedure for data migration.

Precautions

When you create a migration job, note the following issues:
  • A migration job occupies the network resources of the source data address and destination data address. To ensure business continuity, we recommend that you specify a speed limit for a migration job or perform the migration job during off-peak hours.
  • Before a migration job is performed, files at the source data address and the destination data address are checked. The files at the destination data address are overwritten if the source files have the same name as the destination files and have a later modification time. If two files have the same name but different content, you must change the name of one file or back up the files.
  • Symbolic links that exist at the source data address are ignored during migration.

Step 1: Create a source data address

  1. Log on to the Data Transport console.
  2. Choose Data Online Migration > Data Address, and click Create Data Address.
  3. In the Create Data Address dialog box, configure the parameters and click OK. The following table lists the parameters.
    Parameter Required Description
    Data Type Yes Select NAS.
    Data Region Yes Select the region where the NAS file system is located.

    If you select Alibaba Cloud for the NAS Type, select the region where the NAS file system is located. If you select Others for the NAS Type, select the region of the VPC to which the third-party NAS file system is attached.

    Data Name Yes A data name must be 3 to 63 characters in length. Special characters are not supported, except for hyphens (-) and underscores (_).
    NAS Source Yes Select the source of a NAS file system.
    • Alibaba Cloud: a file system that is created by using Apsara File Storage NAS.
    • Others: a file system that is created by using a third-party NAS service. You must mount the file system on an ECS instance that is located in a VPC.
    File System Yes (only for Apsara File Storage NAS) Select the required NAS file system.
    Mount Point Yes (only for Apsara File Storage NAS) Select the mount point of the NAS file system.
    Notice You can only mount a NAS file system on an ECS instance that is located in a VPC. The classic network is not supported.
    VPC Yes (only for third-party NAS services) Select the VPC to which the third-party NAS file system is attached.
    VSwitch Yes (only for third-party NAS services) Select a VSwitch that is owned by the VPC.
    NAS Address Yes (only for third-party NAS services) Enter the IP address of the third-party NAS server. This IP address must be accessible to the VPC.
    Subdirectory No Enter the directory to be migrated. If you leave this field blank, all data stored in the root directory (/) is migrated.
    Notice If you specify a directory, ensure that the directory exists in the NAS server. Otherwise, the data address fails to be created.
    Connection Type Yes (only for third-party NAS services) Select a protocol type for NAS.
    Connection Password Yes (only for third-party NAS services) Specify whether a password is required.
    • No password: No password is required to access the NAS service.
    • Use Password: A username and password are required to access the NAS service. You must enter a valid username and password.
    Note For more information about the status of a new data address, see Data address status.
  4. You must apply for whitelist permissions because this feature is in the public preview phase. Click Application.
  5. Enter the required information and submit the application for using this feature. After the application is approved, you will receive a short message service (SMS) notification.

Step 2: Create a destination data address

  1. Choose Data Online Migration > Data Address, and click Create Data Address.
  2. In the Create Data Address dialog box, configure the parameters and click OK. The following table lists the parameters.
    Parameter Required Description
    Data Type Yes Select OSS.
    Data Region Yes Select the region where the destination data address is located.
    Data Name Yes A data name must be 3 to 63 characters in length. Special characters are not supported, except for hyphens (-) and underscores (_).
    OSS Endpoint Yes Select an endpoint based on the region where your data is located. For more information, see Endpoints.
    AccessKeyId and AccessKeySecret Yes Enter the AccessKey pair that is used to migrate data. For more information, see Create and authorize a RAM user.
    OSS Bucket Yes Select a bucket to store the migrated data.
    OSS Prefix No An OSS prefix cannot start with a forward slash (/) and must end with a forward slash (/), for example, data/to/oss/. Do not specify this parameter if you want to migrate data to the root directory of a bucket.

Step 3: Create a migration job

  1. Choose Data Online Migration > Migration Jobs, and click Create Job.
  2. In the Create Job dialog box, read the Terms of Migration Service, select I understand the above terms and conditions, and apply for opening data migration service, and then click Next.

    Then, the Fee Reminder dialog box appears.

    OSS_billing request
  3. In the Create Job dialog box, configure the parameters and click Next.

    The following table lists the parameters.

    Parameter Required Description
    Job Name Yes A job name must be 3 to 63 characters in length and can contain lowercase letters, digits, and hyphens (-). It cannot start or end with a hyphen (-).
    Source Data Address Yes Select the source data address that you have created.
    Destination Data Address Yes Select the destination data address that you have created.
    Notice If the source data address and the destination data address are located in different countries or regions, you must submit a ticket to request permissions to create a cross-country or cross-region migration job. You must ensure that your business is legitimate, data transit conforms to local rules and regulations, and data does not include illegal information.
    Specified Directory No
    • Do not filter: All data at the source data address is migrated.
    • Exclude: The files and subdirectories in the excluded directories are not migrated.
    • Contain: Only the files and subdirectories in the specified directories are migrated.
    Note
    • A directory cannot start with a forward slash (/) or a backslash (\), and cannot contain double slashes (//), double periods (..), or double quotation marks ("). The character string that consists of all the specified directory names cannot exceed 10 KB in size.
    • A directory must end with a forward slash (/), for example, docs/.
    • You can specify a maximum of 20 directories of the Exclude or Contain type.
    Migration Type Yes Before you start a migration job, Data Transport compares files of the source data address with those of the destination data address. If source files have the same name as destination files and the update time of the source files is earlier than that of the destination files, these source files are skipped during migration. All the other files are migrated.
    • Full: specifies a full migration job. After all data is migrated, a migration job is closed. You can submit the job again if the data at the source data address changes. In this case, Data Transport migrates only the data that is changed after the previous job.
    • Incremental: specifies an incremental migration job. To perform an incremental job, specify the Migration Interval and Migration Times parameters based on your needs. All files are migrated during the first migration. After the first migration is complete, an incremental migration is performed based on the migration interval. An incremental migration job only migrates files that are created or modified after the previous migration started and before this migration starts. Assume that you specify N for the migration times. Full migration is performed once. Then, incremental migration is performed (N-1) times. For example, you can set the migration interval to 1 hour and migration times to 5. Data Transport performs one full migration and four incremental migrations at an interval of 1 hour.
    • Sync: You can synchronize data from the source data address to the destination data address. A synchronization job continues to run based on the specified synchronization interval until you stop the job. When a synchronization job is performed for the first time, files are synchronized based on the specified start time point. After the first synchronization is complete, files that are created or modified after the start time of the last synchronization will be synchronized when the specified synchronization interval ends. For example, the first synchronization is performed at 2018-11-01 08:00. For the second synchronization, files that are created or modified after 2018-11-01 08:00 are synchronized.
      Notice You can select Sync if the source data address and the destination data address are located in the same region. Otherwise, you cannot select this option.
    Migration Interval Yes (only for incremental migration) The default value is 1 hour and the maximum value is 24 hours.
    Migration Times Yes (only for incremental migration) The default value is 1 and the maximum value is 30.
    Start Time Point of File Yes (only for synchronization)
    • All: All files are synchronized.
    • Assign: Files that are created or modified after the specified time are synchronized. For example, if you set the start time point to 2018-11-01 08:00:00, only files that are created or modified after 2018-11-01 08:00:00 are synchronized. Files that are created or modified before the specified time are skipped.
    Start Time of Job Yes (only for synchronization)
    • Immediately: A synchronization job immediately runs after a migration job is completed.
    • Schedule: You can schedule a synchronization time and synchronize data at the specified time.
    Job Period Yes (only for synchronization) The time interval between two synchronization jobs. A synchronization job starts each time an interval ends. Valid units: hour, day, and week.
    Don't trigger new task if another task running Yes (only for synchronization) Specifies whether to start a new synchronization job if the last synchronization job is still running when the synchronization interval ends. You must combine the use of this parameter with Job Period. Assume that you set Job Period to 1 hour and do not select this parameter. The next synchronization job runs regardless of whether the last synchronization job is completed within 1 hour. This parameter is selected by default.
  4. Click Next to go to the Performance tab.
    • If you select Full or Incremental for the job type, specify the Data Size and File Count parameters.
      Note To ensure a successful migration, you must estimate the amount of data to be migrated.
    • If you select Sync for the job type, specify the Subtask File Count and Subtask File Size parameters.
      • Subtask File Count: You can separate a migration job into multiple subtasks based on the number of files that you specify. A maximum of 20 subtasks can run at a time. Set an appropriate number of files for each subtask to reduce the time of a migration job. The default value is 1000. Assume that you need to migrate 10,000 files. If you set the Subtask File Count parameter to 500, the migration job is separated into 20 subtasks that run at the same time. If you set the Subtask File Count parameter to 100, the migration job is separated into 100 subtasks. Each time 20 subtasks run and the remaining subtasks are queued.
      • Subtask File Size: You can separate a migration job into multiple subtasks based on the number of files that you specify. A maximum of 20 subtasks can run at a time. Set an appropriate size of files for each subtask to reduce the time of a migration job. The default value is 1 GB. Assume that you need to migrate files with a total size of 40 GB. If you set the Subtask File Size parameter to 2 GB, the migration job is separated into 20 subtasks that run at the same time. If you set the Subtask File Size parameter to 1 GB, the migration job is separated into 40 subtasks. Each time 20 subtasks run and the remaining subtasks are queued.
      Note Subtask are generated if the specified Subtask File Count or Subtask File Size parameter value is reached. If the number of files reaches the specified Subtask File Count parameter value but the file size does not reach the specified Subtask File Size parameter value, subtasks are generated based on the number of files. If the file size reaches the specified Subtask File Size parameter value but the number of files does not reach the specified Subtask File Count parameter value, subtasks are generated based on the file size. Assume that you set the Subtask File Count parameter to 1000 and Subtask File Size parameter to 1 GB. If the number of files reaches 1,000 but the file size does not reach 1 GB, subtasks are generated based on the number of files. If the file size reaches 1 GB but the number of files does not reach 1,000, subtasks are generated based on the file size.
  5. Optional. On the Performance tab, navigate to the Flow Control section, specify the Time Range and Max Flow parameters, and then click Add.
    Note To ensure business continuity, we recommend that you specify the Time Range and Max Flow parameters based on the fluctuation of workloads. The default value of the Time Range parameter is 06:00 - 12:00. The default value of the Max Flow parameter is 5 MB/s.
  6. Click Create and wait until a migration job is completed.

View the status of a data address

After you create a NAS data address, one of the following states is displayed for the data address:
  • Normal: indicates that the data address is created.
  • Creating: indicates that the data address is being created. The process of creating the first NAS data address requires about three minutes. If the state of the data address remains Creating for a long time, you can click Refresh in the upper-right corner to update the status.
  • Invalid: indicates that an error occurs when you create the data address. You can check whether the configurations are valid and Data Transport is allowed to access the NAS service. If this issue persists, you can contact Alibaba Cloud technical support.