Configure a data migration task (old console)

更新时间:
复制 MD 格式

Data Transmission Service (DTS) provides a user-friendly data migration feature. You can configure an entire migration task in a few simple steps on the DTS console.

If you are new to data migration, see the Data migration guide to learn how to create, monitor, and manage migration tasks.

Notes

This topic describes the general procedure for configuring a data migration task. The steps may vary slightly depending on the data source. For detailed examples, see Migration scenarios.

Prerequisites

  • If the source or destination database is a self-managed database, you must perform additional preparation steps to meet the environment requirements for DTS. For more information, see Preparation overview.

  • Prepare the database accounts for the source and destination databases.

Procedure

  1. Log in to the DTS console.

    Note

    If you are automatically redirected to the Data Management (DMS) console, you can click the jiqiren icon in the lower-right corner and then click 返回旧版 to return to the classic DTS console.

  2. In the left-side navigation pane, click Data Migration.

  3. At the top of the Migration Tasks page, select the region of your destination instance.

  4. In the upper-right corner of the page, click Create Data Migration Task.

  5. Configure the task name and the connection information for the source and destination instances. In the Source Database section, set Instance Type to Self-managed Database with Public IP, Instance Region to the region of the source database, and Database Type to MySQL. Then, enter the Hostname or IP Address, Port (default is 3306), Database Account, and Database Password, and click Test Connection. In the Destination Database section, set Instance Type to RDS Instance and Instance Region to the region of the destination instance. Select the RDS Instance ID, enter the Database Account and Database Password, set Connection Method to Non-encrypted Connection or SSL Secure Connection, and then click Test Connection.

  6. After you complete the configuration, click Authorize Whitelist and Go to Next Step.

    Note

    If the source or destination instance is an Alibaba Cloud instance, this step automatically adds the IP addresses of DTS servers to the instance's whitelist, allowing DTS to connect.

  7. Select the migration objects and Migration Types.

    Parameter

    Description

    Migration type

    • To perform only a full data migration, select both Schema Migration and Full Data Migration.

    • To perform a migration with minimal downtime, select Schema Migration, Full Data Migration, and Incremental Data Migration.

    Note

    To ensure data consistency, do not add data to the source database during the migration unless you have selected Incremental Data Migration.

    Migration objects

    In the Available objects box, click the objects that you want to migrate, and then click 向右小箭头 to move them to the Selected Objects objects box.

    Note
    • You can select objects to migrate at the database, table, or column level. If you select tables or columns, other object types, such as views, triggers, and stored procedures, are not migrated to the destination database.

    • By default, migrated objects retain their source names in the destination database. To rename objects in the destination database, use the object name mapping feature. For more information, see Object name mapping.

    • If you use the object name mapping feature, other objects that depend on a renamed object may fail to migrate.

    Object name mapping

    To rename migrated objects in the destination instance, use the object name mapping feature. For more information, see Object name mapping.

    Connection retry duration

    By default, if a connection to the source or destination database fails, DTS retries for 12 hours. You can also specify a custom retry duration. If DTS reconnects within the specified time, the migration task automatically resumes. Otherwise, the task fails.

    Note

    You are charged for the DTS task while it retries the connection. We recommend that you specify a retry duration based on your business needs, or release the DTS instance as soon as possible after the source and destination database instances are released.

    Copy temporary tables for online DDL

    If you use Data Management (DMS) to perform online DDL operations on the source database, you can choose whether to migrate the data from the temporary tables that are generated by these operations.

    • Yes: Migrates the data from the temporary tables generated by online DDL operations.

      Note

      If the temporary tables generated by online DDL operations contain a large amount of data, the migration task may experience latency.

    • No: Does not migrate the data from temporary tables generated by online DDL operations. Only the original DDL data from the source database is migrated.

      Note

      This option may cause table locks on the destination database.

  8. After you complete these settings, click Pre-check and Start in the lower-right corner of the page.

    Note
    • DTS performs a precheck before the task starts. The task can start only after it passes the precheck.

    • If the precheck fails, click the 提示 icon next to the failed item to view details.

      • Fix the issues based on the details, and then run the precheck again.

      • For warnings that do not require a fix, you can select Ignore or Ignore and Rerun Precheck to run the precheck again.

  9. After the task passes the precheck, click Next.

  10. On the Confirm Settings page, choose a Instance Class and select the Data Transmission Service (Pay-As-You-Go) Terms of Service checkbox.

  11. Click Purchase and Start.

    • Full data migration

      Do not manually stop the task, as this may result in incomplete data. The task stops automatically upon completion.

    • Incremental data migration

      This task does not stop automatically and must be stopped manually.

      1. Wait until the task progress changes to Incremental Data Migration and the status shows Undelayed. Then, stop writing data to the source database for a few minutes. During this time, the Incremental Data Migration status may show a delay.

      2. Wait for the Incremental Data Migration status to return to Undelayed. Then, manually stop the task. To do this, select the checkbox for the task and click Stop at the bottom of the page.