Configure a data synchronization task (old console)

更新时间:
复制 MD 格式

Data Transmission Service (DTS) offers an easy-to-use data synchronization feature. You can configure a data synchronization task on the DTS console in a few simple steps.

If you are new to the data synchronization feature, read Data Synchronization Guide to learn how to create, monitor, and manage a data synchronization task.

Notes

This topic describes the general procedure for configuring a data synchronization task. The specific steps can vary depending on the data sources. For detailed examples for different data sources, see Overview of data synchronization scenarios.

Before you begin

If the source database is a PolarDB for MySQL database or a self-managed MySQL database, you must enable the binlog feature. For more information, see Enable binlog and Create an account and enable binlog for a self-managed MySQL database.

Procedure

  1. Purchase a data synchronization instance based on the database type and region of the source and destination instances. For more information, see Purchase process.

  2. Log on to the Data Transmission Service 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.

  3. In the left-side navigation pane, click Data Synchronization.

  4. At the top of the Synchronization Tasks page, select the region of your data synchronization instance.

  5. Find the data synchronization instance that you purchased and click Configure Synchronization Channel for that instance.

  6. Configure the source and destination instances. On the configuration page, enter a Synchronization Task Name. In the Source Instance Information section, set Instance Type to self-managed database on an ECS instance, and configure the Instance Region, ECS Instance ID, Database Type (such as MySQL), Port, Database Account, and Database Password. In the Destination Instance Information section, set Instance Type to RDS instance, and configure the Instance Region, Instance ID, Database Account, Database Password, and Connection Method (Unencrypted Connection or SSL Encrypted Connection).

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

    Note

    If the source or destination instance is an Alibaba Cloud database instance, this step automatically adds the IP addresses of the DTS servers to the whitelist of the instance. This ensures that the DTS servers can connect to the instance.

  8. Configure the synchronization policy and objects. Then, click Next in the lower-right corner of the page.

    Parameter

    Description

    Select synchronization objects

    In the Source Objects box, select the objects to synchronize, and click the 向右小箭头 icon to move them to the Selected Objects box.

    You can select databases or tables as synchronization objects.

    Note
    • If you select an entire database to synchronize, all DDL operations on objects in that database are synchronized to the destination database.

    • By default, synchronized objects retain their original names in the destination database. To change these names, use the object name mapping feature. For more information, see Map object names.

    Library, table, and column mapping

    Change the names of synchronized objects in the destination instance. For more information, see Map databases, tables, and columns.

    Replicate temporary tables during DMS online DDL

    If you use Data Management (DMS) to perform online DDL changes on the source database, you can choose whether to synchronize the temporary tables generated by the DDL changes.

    • Yes: Synchronizes the temporary tables generated by online DDL changes.

      Note

      If a large amount of temporary table data is generated by online DDL changes, the data synchronization task may be delayed.

    • No: Does not synchronize the temporary tables generated by online DDL changes. Only the original DDL operations from the source database are synchronized.

      Note

      This option causes tables in the destination database to be locked.

    Connection retry duration

    If DTS cannot connect to the source or destination instance, it retries for 720 minutes (12 hours) by default. You can also specify a custom retry duration. If DTS reconnects to the source or destination instance within the specified duration, the synchronization task automatically resumes. Otherwise, the task fails.

    Note

    You are billed for task run time during connection retries. Customize the retry duration based on your business needs, or release the DTS instance as soon as the source and destination instances are released.

  9. Configure advanced settings for synchronization initialization. On the Advanced Settings page, under Synchronization Initialization, the Schema Initialization and Full Data Initialization options are selected by default.

  10. After you finish the configuration, click Precheck and Start in the lower-right corner of the page.

    Note
    • Before the synchronization task starts, DTS performs a precheck. The task can start only after passing the precheck.

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

      • You can fix the issues based on the details and run the precheck again.

      • If you do not need to fix the warning items, you can click Ignore or Ignore and Rerun Precheck to proceed.

  11. After Precheck Passed is displayed in the Precheck dialog box, close the Precheck dialog box. The synchronization task then starts.

  12. Wait for the synchronization channel to initialize. The task status will then change to Synchronizing.

    You can view the data synchronization status on the Data Synchronization page.

Related documents