All Products
Search
Document Center

Data Transmission Service:Synchronize PolarDB-X 1.0 to ApsaraDB RDS for MySQL

Last Updated:Aug 27, 2026

This topic describes how to use Data Transmission Service (DTS) to synchronize incremental data in real time from a PolarDB-X 1.0 instance to an ApsaraDB RDS for MySQL instance.

Prerequisites

  • A PolarDB-X 1.0 instance has been created. For instructions, see Create a PolarDB-X 1.0 instance and Create a database.

    Note

    The PolarDB-X 1.0 instance must use ApsaraDB RDS for MySQL as its storage type. This includes both privately customized and separately purchased RDS instances. PolarDB for MySQL is not supported.

  • Ensure that the character set of the data to be synchronized is not utf8mb3. Otherwise, the incremental data synchronization task fails.

  • A destination ApsaraDB RDS for MySQL instance has been created. The storage space of the destination instance must be larger than the storage space used by the source PolarDB-X 1.0 instance. For more information, see (Deprecated, redirected to "Step 1") Quickly create an ApsaraDB RDS for MySQL instance.

Usage notes

Note
  • During schema synchronization, DTS synchronizes foreign keys from the source database to the destination database.

  • During full data synchronization and incremental data synchronization, DTS temporarily disables constraint checks and foreign key cascade operations at the session level. Data inconsistency may occur if cascade update or delete operations are performed on the source database while the task is running.

Category

Description

Limits on the source database

  • The tables to be synchronized must have PRIMARY KEY or UNIQUE constraints (tables that have only UNIQUE constraints do not support schema synchronization, so we recommend that you use PRIMARY KEY constraints), and the fields must be unique. Otherwise, the destination database may contain duplicate data. Tables that have secondary indexes cannot be synchronized.

  • If you select tables as the objects to be synchronized and you want to edit the tables, such as mapping table or column names, you can synchronize up to 5,000 tables in a single data synchronization task. If you run a task to synchronize more than 5,000 tables, a request error may occur after you submit the task. In this case, we recommend that you split the tables to be synchronized and configure multiple tasks to synchronize the tables in batches, or configure a task to synchronize the entire database.

  • The following requirements for binary logs of the RDS for MySQL instances attached to the  instance must be met:

    • The binary logging feature must be enabled, and the binlog_row_image parameter must be set to full. Otherwise, an error is reported during the precheck, and the data synchronization task cannot be started.

    • For an incremental synchronization task, DTS requires that the binary logs of the source database be retained for at least 24 hours. For a task that performs both full and incremental synchronization, DTS requires that the binary logs of the source database be retained for at least seven days. You can set the retention period of binary logs to more than 24 hours after the initial full data synchronization is complete. Otherwise, DTS may fail to obtain the binary logs and the task may fail. In exceptional circumstances, data may be inconsistent or lost. Issues that are caused because the retention period of binary logs is shorter than the required period are not covered by the DTS Service-Level Agreement (SLA).

  • Limits on operations to be performed on the source database:

    • If you change the network type of the  instance during data synchronization, you must modify the network connectivity information of the synchronization link after the network type is changed.

    • During data synchronization, do not scale the source instance, such as scaling the attached RDS for MySQL instance or changing the distribution of physical databases and tables that correspond to logical databases and tables in the RDS for MySQL instance even if the RDS for MySQL instance is not scaled. In addition, do not migrate hot spot tables, change shard keys, or perform DDL operations. Otherwise, the data synchronization task fails or data inconsistency occurs.

    • Do not run DDL operations that change database or table schemas during schema synchronization or full synchronization. Otherwise, the synchronization task fails.

      Note

      During full synchronization, DTS queries the source database. This creates metadata locks that may block DDL operations on the source database.

  • The storage class of the  instance must be RDS for MySQL, including private custom RDS and separately purchased RDS. PolarDB for MySQL is not supported as the storage class.

  • Storage resources of  can be split only using horizontal splitting (sharding). Vertical splitting is not supported.

  • Read-only instances of  computing resources are not supported.

  • The version of the source PolarDB-X 1.0 instance must be 5.2 or later. 

Other limits

  • Indexes and partitions are not synchronized.

  • DTS ensures the data consistency of incremental synchronization tasks based on the continuity of XA transactions in the source PolarDB-X 1.0 instance. If the continuity of XA transactions is disrupted, for example, when you modify the synchronization objects or in disaster recovery scenarios for the incremental data collection module, uncommitted XA transactions may be lost.

  • A data synchronization task for a  instance is a distributed task. A subtask is created for each attached RDS for MySQL instance. You can view the running status of subtasks in the Task Topology.

  • If your data includes four-byte characters—such as rare Chinese characters or emojis—the destination database and table must use the utf8mb4 charset.

    Note

    If you use DTS to synchronize table schemas, set the character_set_server parameter at the instance level in the destination database to utf8mb4.

  • Before you synchronize data, you must evaluate the performance of the source and destination databases. We recommend that you synchronize data during off-peak hours. Otherwise, initial full data synchronization may consume read and write resources of the source and destination databases and increase database loads.

  • During initial full data synchronization, concurrent INSERT operations cause fragmentation in the tables of the destination database. Therefore, after initial full data synchronization is complete, the tablespace of the destination instance is larger than that of the source instance.

  • Do not use tools such as pt-online-schema-change to perform online DDL operations on the synchronization objects in the source database. Otherwise, the synchronization fails.

  • During data synchronization, do not write data to the destination database using other tools. Otherwise, data inconsistency between the source and destination databases occurs. For example, if you use DMS to perform online DDL operations when data is written to the destination database using other tools, data may be lost in the destination database.

  • If you write columns with names that differ only in case to the same table in the destination MySQL database, unexpected results may occur because MySQL column names are case-insensitive.

  • After data synchronization completes (the instance's Status is Completed), you should use the ANALYZE TABLE <table_name> command to confirm that all data is written to the target table. For example, after the HA failover mechanism is triggered in the target MySQL database, data might be written only to memory, which can cause data loss.

  • If a task fails, DTS support staff will attempt to restore it within eight hours. During restoration, they may restart the task or adjust its parameters.

    Note

    Only DTS task parameters are modified—not database parameters. Parameters that may be adjusted include those listed in Modify instance parameters.

Billing

Synchronization type

Fee

Full data synchronization

Free of charge

Incremental data synchronization

Charged. See Billing overview.

Supported synchronization topologies

  • One-to-one, one-way synchronization

  • One-to-many, one-way synchronization

  • Cascading, one-way synchronization

  • Many-to-one, one-way synchronization

For more information about the supported synchronization topologies and their usage notes, see Synchronization topologies.

Supported SQL operations

Operation type

SQL statements

DML

INSERT, UPDATE, DELETE

Permissions required for database accounts

Database

Required permissions

Account setup

Source PolarDB-X 1.0 instance

Read permissions on the objects to be synchronized.

Manage accounts

Destination ApsaraDB RDS for MySQL instance

Read and write permissions on the destination database to which the objects are synchronized.

Create an account and Modify the permissions of a standard account on an ApsaraDB RDS for MySQL instance.

Procedure

  1. Go to the sync task list page of the destination region. You can use one of the following two methods:

    From the DTS console

    1. Log on to the Data Transmission Service (DTS) console.

    2. In the navigation pane on the left, click Data Synchronization.

    3. In the upper-left corner of the page, select the region where the sync instance is located.

    From the DMS console

    Note

    The actual operations may vary based on the mode and layout of the DMS console. For more information, see Simple mode and Customize the layout and style of the DMS interface.

    1. Log on to Data Management (DMS).

    2. In the top menu bar, choose Data + AI > Data Transmission (DTS) > Data Synchronization.

    3. To the right of Data Synchronization Tasks, select the region where the sync instance is located.

  2. Click Create Task to open the task configuration page.

  3. Optional: In the upper-right corner of the page, click New Configuration Page.

    Note
    • If the button in the upper-right corner is Back to Previous Version, you can skip this step.

    • The new and old configuration pages have different parameters. We recommend that you use the new configuration page.

  4. Configure the source and destination databases.

    Warning

    After selecting the source and destination instances, review the Limits at the top of the page to ensure the task can be created and run successfully.

    Category

    Parameter

    Description

    N/A

    Task Name

    DTS automatically generates a task name. We recommend that you specify a descriptive name for easy identification. The name does not have to be unique.

    Source Database

    Database Type

    Select PolarDB-X 1.0.

    Connection Type

    Select Alibaba Cloud Instance.

    Instance Region

    Select the region where the source PolarDB-X 1.0 instance resides.

    Replicate Data Across Alibaba Cloud Accounts

    This example uses a database instance that belongs to the current Alibaba Cloud account. Select No.

    Instance ID

    Select the ID of the source PolarDB-X 1.0 instance.

    Database Account

    Enter the database account of the source PolarDB-X 1.0 instance. For information about the required permissions, see Permissions required for database accounts.

    Database Password

    Enter the password that corresponds to the database account.

    Destination Database

    Database Type

    Select MySQL.

    Connection Type

    Select Alibaba Cloud Instance.

    Instance Region

    Select the region where the destination ApsaraDB RDS for MySQL instance resides.

    Replicate Data Across Alibaba Cloud Accounts

    This example uses a database instance that belongs to the current Alibaba Cloud account. Select No.

    RDS instance ID

    Select the ID of the destination ApsaraDB RDS for MySQL instance.

    Database Account

    Enter the database account of the destination ApsaraDB RDS for MySQL instance. For information about the required permissions, see Permissions required for database accounts.

    Database Password

    Enter the password that corresponds to the database account.

    Connection Method

    Select Non-encrypted or SSL-encrypted as needed. If you select SSL-encrypted, you must enable SSL encryption for the RDS for MySQL instance in advance. For more information, see Use a cloud certificate to quickly enable SSL encryption.

  5. After you have completed the configuration, click Test Connectivity and Proceed at the bottom of the page.

    Note
    • Ensure that the IP address CIDR blocks of DTS servers are added to the security settings of the source and destination databases to allow access from DTS servers. This can be done automatically or manually. For more information, see Add the IP address CIDR blocks of DTS servers to a whitelist.

    • If the source or destination database is a self-managed database (where the Access Method is not Alibaba Cloud Instance), you must also click Test Connectivity in the CIDR Blocks of DTS Servers dialog box.

  6. Configure task objects.

    1. On the Configure Objects page, configure the objects to synchronize.

      Parameter

      Description

      Synchronization Types

      Incremental Data Synchronization is selected. By default, you must also select Schema Synchronization and Full Data Synchronization. After the precheck is complete, DTS performs a full data synchronization of the selected objects from the source instance to the destination cluster. This serves as the baseline data for subsequent incremental data synchronization.

      Processing Mode of Conflicting Tables

      • Precheck and Report Errors: DTS checks for tables with the same name in the destination database. If a conflict exists, DTS reports an error during the precheck and does not start the task.

        Note

        If it is not practical to delete or rename the conflicting table, you can map the table to a different name. For more information, see Map object names.

      • Ignore Errors and Proceed: Skips the check for tables with the same name in the destination database.

        Warning

        If you select Ignore Errors and Proceed, data inconsistency may occur. For example:

        • If the table schemas are consistent, destination records with the same primary or unique key as source records are overwritten.

        • If the table schemas are inconsistent, the task may fail or only partially synchronize data. Proceed with caution.

      Capitalization of Object Names in Destination Instance

      You can configure the case sensitivity policy for database, table, and column object names that are synchronized to the destination instance. By default, the DTS default policy is selected. You can also choose to use the default policies of the source and destination databases. For more information, see Case sensitivity policy for destination object names.

      Source Objects

      In the Source Objects box, click an object to synchronize, and then click 向右 to move it to the Selected Objects box.

      Note

      We recommend that you select tables as synchronization objects. If you select an entire database, changes to add or delete tables in that database are not synchronized to the destination database.

      Selected Objects

      Note
      • To select SQL operations to synchronize at the database or table level, right-click the synchronization object in the Selected Objects box and select the desired SQL operations in the dialog box that appears. For a list of supported operations, see Supported SQL operations.

      • To set a WHERE condition to filter data, right-click the table to be synchronized in the Selected Objects box and set the filter condition in the dialog box that appears. For more information, see Set filter conditions.

    2. Click Next: Advanced Settings to configure advanced parameters.

      Parameter

      Description

      Dedicated Cluster for Task Scheduling

      By default, DTS schedules tasks on a shared cluster, and you do not need to select a cluster. For more stable performance, you can purchase a dedicated cluster to run DTS sync tasks. For more information, see What is a DTS dedicated cluster?.

      Retry Time for Failed Connections

      After a sync task starts, if the connection to the source or destination database fails, DTS reports an error and immediately begins to retry the connection. The default retry duration is 720 minutes. You can also specify a custom retry duration from 10 to 1,440 minutes. We recommend that you set the duration to 30 minutes or more. If DTS successfully reconnects to the database within the specified duration, the sync task automatically resumes. Otherwise, the task fails.

      Note
      • If you have multiple DTS instances (for example, Instance A and Instance B) that share the same source or destination, and you set the network retry time to 30 minutes for Instance A and 60 minutes for Instance B, the shorter duration of 30 minutes is used for both.

      • Because DTS charges for task runtime during the connection retry period, we recommend that you customize the 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.

      Retry Time for Other Issues

      After the sync task starts, if other non-connectivity issues occur with the source or destination database (such as DDL or DML execution exceptions), DTS reports an error and immediately starts continuous retry operations. The default retry duration is 10 minutes. You can also customize the retry duration within the range of 1 to 1,440 minutes. We recommend that you set it to 10 minutes or more. If the relevant operations are successful within the set retry duration, the sync task automatically resumes. Otherwise, the task fails.

      Important

      The value for Retry Time for Other Issues must be less than that for Retry Time for Failed Connections.

      Enable Throttling for Full Data Synchronization

      During the full synchronization stage, DTS consumes read and write resources from the source and destination databases, which can increase the database load. To reduce the load on the source and destination databases, you can set a rate limit for the full synchronization task by configuring the Queries per second (QPS) to the source database, RPS of Full Data Migration, and Data migration speed for full migration (MB/s) parameters.

      Note
      • This configuration item is available only when Synchronization Types is set to Full Data Synchronization.

      • You can also adjust the full synchronization rate after the sync instance is running.

      Enable Throttling for Incremental Data Synchronization

      You can also set a rate limit for the incremental synchronization task. To relieve pressure on the destination database, set the RPS of Incremental Data Synchronization and Data synchronization speed for incremental synchronization (MB/s).

      Environment Tag

      You can select an environment tag to identify the instance. This example does not require a selection.

      Configure ETL

      Choose whether to enable the extract, transform, and load (ETL) feature. For more information, see What is ETL? Valid values:

      Monitoring and Alerting

      Specify whether to configure alerts. If the synchronization fails or the latency exceeds the specified threshold, a notification is sent to an alert contact.

  7. Save the task and run a precheck.

    • To view the API parameters for configuring this instance, hover over the Next: Save Task Settings and Precheck button and click Preview OpenAPI parameters in the bubble.

    • If you have finished viewing the API parameters, click Next: Save Task Settings and Precheck at the bottom of the page.

    Note
    • Before the synchronization job starts, DTS runs a precheck. The job can start only after all precheck items pass.

    • If the precheck fails, click View Details for the failed item. Fix the issue as prompted, and then run the precheck again.

    • If the precheck returns a warning:

      • If a check item fails and cannot be ignored, click View Details next to the item. Follow the instructions to fix the issue, and then run the precheck again.

      • For check items that can be ignored, you can click Confirm Alert Details, Ignore, OK, and Precheck Again in sequence to skip the warning and rerun the precheck. If you choose to shield the warning item, it may cause issues such as data inconsistency and pose risks to your business.

  8. Purchase the instance.

    1. When the Success Rate is 100%, click Next: Purchase Instance.

    2. On the Purchase page, select the billing method and link specification for the data synchronization instance. The following table describes these parameters in detail.

      Category

      Parameter

      Description

      New Instance Class

      Billing Method

      • Subscription: You pay when you create the instance. This is suitable for long-term needs and is more cost-effective than pay-as-you-go. The longer the subscription duration, the higher the discount.

      • Pay-as-you-go: You are charged on an hourly basis. This is suitable for short-term needs. You can release the instance immediately after use to save costs.

      Resource Group Configuration

      The resource group to which the instance belongs. The default is default resource group. For more information, see What is Resource Management?.

      Link Specification

      DTS provides sync specifications with different performance levels. The sync link specification affects the synchronization rate. You can choose a specification based on your business scenario. For more information, see Data synchronization link specifications.

      Subscription Duration

      In subscription mode, select the duration and quantity for the subscription instance. You can choose a monthly subscription from 1 to 9 months, or a yearly subscription of 1, 2, 3, or 5 years.

      Note

      This option is only available when the billing method is Subscription.

    3. After you complete the configuration, read and select Data Transmission Service (Pay-as-you-go) Service Terms.

    4. Click Buy and Start. In the OK dialog box, click OK.

      You can view the task progress on the Data Synchronization page.