All Products
Search
Document Center

Data Transmission Service:Synchronize data from an ApsaraDB RDS for MySQL instance to a PolarDB-X 1.0 instance

Last Updated:Mar 28, 2026

Use Data Transmission Service (DTS) to continuously synchronize data from an ApsaraDB RDS for MySQL instance to a PolarDB-X 1.0 instance. This covers both full data synchronization and incremental data synchronization (INSERT, UPDATE, DELETE).

Task overview: To configure a synchronization task, complete these steps in order:

  1. Prepare the destination instance and accounts (prerequisites)

  2. Configure binary logging on the source

  3. Create the synchronization task in DTS or DMS

  4. Run the precheck and purchase the instance

Prerequisites

Before you begin, make sure that you have:

  • A destination PolarDB-X 1.0 instance with available storage space exceeding the storage used by the source RDS MySQL instance. Set the storage class to RDS MySQL when creating the instance. See Create a PolarDB-X 1.0 instance.

  • Databases and tables pre-created in the destination PolarDB-X 1.0 instance. Schema synchronization is not supported — DTS does not create the target schema for you. See Create a database and Perform basic SQL operations.

  • A source character set that is not utf8mb3. Selecting utf8mb3 data for incremental synchronization causes the task to fail.

  • Database accounts with the required permissions. See Permissions required for database accounts.

  • Binary logging configured on the source database. See Binary logging requirements.

Binary logging requirements

DTS uses binary logs to capture incremental changes. Requirements differ depending on whether your source is an ApsaraDB RDS for MySQL instance or a self-managed MySQL database.

ApsaraDB RDS for MySQL

Binary logging is enabled by default on ApsaraDB RDS for MySQL instances. Make sure that:

  • The binlog_row_image parameter is set to full. If it is not, a precheck error occurs and the task cannot start. See Set instance parameters.

  • Local binary logs are retained for at least 3 days (7 days recommended). If logs are purged before DTS can read them, the task fails. In extreme cases, data loss or inconsistency may occur. Tasks that fail due to insufficient log retention are not covered by the DTS Service-level agreement (SLA). To set the Retention Period for local binary logs, see Automatically delete local logs.

ApsaraDB RDS for MySQL 5.6 read-only instances do not record transaction logs and cannot be used as a source database.

Self-managed MySQL

For a self-managed MySQL database, configure the following parameters:

ParameterRequired value
binlog_formatrow
binlog_row_imagefull

Retain binary logs for at least 7 days. If logs are purged before DTS can read them, the task fails, and issues caused by insufficient log retention are not covered by the DTS SLA.

Additional requirements:

Permissions required for database accounts

DatabaseRequired permissionsHow to create and authorize
Source ApsaraDB RDS for MySQLRead and writeCreate an account and Modify the permissions of an account
Destination PolarDB-X 1.0Read and writeManage database accounts
If the source database account was not created in the ApsaraDB RDS for MySQL console, make sure the account has the REPLICATION CLIENT, REPLICATION SLAVE, SHOW VIEW, and SELECT permissions.

Billing

Synchronization typeBilling
Full data synchronizationFree
Incremental data synchronizationCharged. See Billing overview.

Limits and usage notes

Source database limits

  • The server on which the source database is deployed must have sufficient outbound bandwidth. Insufficient bandwidth reduces synchronization speed.

  • Tables to be synchronized must have a primary key or a UNIQUE constraint with unique field values. Tables that lack these constraints may produce duplicate data in the destination.

  • Only tables can be selected as synchronization objects.

  • When using object name mapping (for example, mapping table or column names), a single task supports a maximum of 1,000 tables. To synchronize more than 1,000 tables with name mapping, split them into multiple tasks.

  • The PolarDB-X 1.0 instance storage class must be RDS MySQL (a private custom RDS). PolarDB MySQL is not supported.

  • Do not perform DDL operations during full data synchronization — this causes the task to fail.

    During the full synchronization phase, DTS queries the source database and may generate metadata locks, which can block DDL operations on the source.
  • Data changes from operations not recorded in binary logs are not synchronized. This includes data recovery using physical backups and cascade operations.

    If this occurs, remove the affected database or table from the synchronization objects and then add it back, if your business permits. See Modify synchronization objects.
  • Invisible columns (MySQL 8.0.23 and later): If the data to be synchronized contains invisible columns, DTS cannot obtain the data in those columns, which may cause data loss. Run the following command to make invisible columns visible:

    ALTER TABLE <table_name> ALTER COLUMN <column_name> SET VISIBLE;

    Tables without a primary key automatically generate an invisible primary key, which must also be made visible. See Invisible Columns and Generated Invisible Primary Keys.

Other limits

  • EncDB (always-confidential): Full data synchronization is not supported when the always-confidential (EncDB) feature is enabled on the source RDS MySQL instance.

    Instances with Transparent Data Encryption (TDE) enabled support schema synchronization, full data synchronization, and incremental data synchronization.
  • If you perform online DDL operations that use temporary tables in the source database, such as merging multiple tables, data may be lost in the destination database or the DTS instance may fail.

  • Do not use tools such as pt-online-schema-change to perform online DDL operations on objects being synchronized — this causes the task to fail.

  • Writing data from other sources to the destination database during synchronization may cause data inconsistency.

  • Evaluate the performance impact on source and destination databases before starting synchronization. Run synchronization tasks during off-peak hours when possible. Full data synchronization uses read and write resources on both databases and may increase server load.

  • After full data synchronization completes, concurrent INSERT operations may cause fragmentation in the destination tables. The used tablespace of the destination database may be larger than that of the source database.

  • If a DTS instance fails, the DTS support team will attempt to recover it within 8 hours. Recovery operations may include restarting the instance or adjusting DTS instance parameters (not database parameters). See Modify instance parameters.

Special cases for self-managed MySQL sources

  • If a primary/secondary failover occurs in the source database during synchronization, the task fails.

  • Synchronization latency is calculated from the difference between the current timestamp and the timestamp of the last synchronized data record. If no DML operations are performed on the source database for a long time, the displayed latency may be inaccurate. Perform a DML operation on the source to update the latency reading.

    If you choose to synchronize the entire database, create a heartbeat table. DTS updates or writes to the heartbeat table every second to keep the latency reading accurate.
  • DTS periodically runs CREATE DATABASE IF NOT EXISTS \test\`` on the source database to advance the binary log offset.

Special cases for ApsaraDB RDS for MySQL sources

  • ApsaraDB RDS for MySQL instances that do not record transaction logs, such as read-only instances of ApsaraDB RDS for MySQL 5.6, cannot be used as a source database.

  • DTS periodically runs CREATE DATABASE IF NOT EXISTS \test\`` on the source database to advance the binary log offset.

Create a data synchronization task

Step 1: Go to the Data Synchronization page

Use either the DTS console or the DMS console.

DTS console

  1. Log on to the DTS console.DTS console

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

  3. In the upper-left corner, select the region where the synchronization instance resides.

DMS console

Note

The actual operations may vary based on the mode and layout of the DMS console. See Simple mode and Customize the layout and style of the DMS console.

  1. Log on to the DMS console.DMS console

  2. In the top navigation bar, move the pointer over Data + AI and choose DTS (DTS) > Data Synchronization.

  3. From the drop-down list to the right of Data Synchronization Tasks, select the region where the synchronization instance resides.

Step 2: Configure source and destination databases

  1. Click Create Task.

  2. On the task configuration page, set the following parameters.

General

ParameterDescription
Task NameDTS auto-generates a task name. Specify a descriptive name to make the task easy to identify. The name does not need to be unique.

Source database

ParameterValue
Select Existing ConnectionSelect a registered database instance from the drop-down list. DTS auto-populates the remaining parameters. If the instance is not registered with DTS, configure the parameters below manually. In the DMS console, select the instance from the Select a DMS database instance list.
Database TypeMySQL
Access MethodAlibaba Cloud Instance
Instance RegionThe region where the source ApsaraDB RDS for MySQL instance resides
Replicate Data Across Alibaba Cloud AccountsNo (for instances under the current account)
RDS Instance IDThe ID of the source ApsaraDB RDS for MySQL instance
Database AccountThe account of the source instance. See Permissions required for database accounts.
Database PasswordThe password for the database account
EncryptionNon-encrypted or SSL-encrypted. To use SSL encryption, enable SSL encryption on the RDS instance before configuring this task. See Use a cloud certificate to enable SSL encryption.

Destination database

ParameterValue
Select Existing ConnectionSelect a registered database instance from the drop-down list. DTS auto-populates the remaining parameters. If the instance is not registered with DTS, configure the parameters below manually. In the DMS console, select the instance from the Select a DMS database instance list.
Database TypePolarDB-X 1.0
Access MethodAlibaba Cloud Instance
Instance RegionThe region where the destination PolarDB-X 1.0 instance resides
Instance IDThe ID of the destination PolarDB-X 1.0 instance
Database AccountThe account of the destination instance. See Permissions required for database accounts.
Database PasswordThe password for the database account
  1. Click Test Connectivity and Proceed.

Make sure that DTS server CIDR blocks are added to the security settings of both the source and destination databases. See Add DTS server IP addresses to a whitelist. If the source or destination database is a self-managed database not accessed through Alibaba Cloud Instance, click Test Connectivity in the CIDR Blocks of DTS Servers dialog box.

Step 3: Configure synchronization objects

In the Configure Objects step, set the following parameters.

ParameterDescription
Synchronization TypesIncremental Data Synchronization is selected by default. Optionally select Full Data Synchronization. Schema Synchronization cannot be selected — create the target schema manually before starting the task. After the precheck passes, DTS synchronizes historical data from the source as the basis for incremental synchronization.
Processing Mode of Conflicting TablesPrecheck and Report Errors: checks whether the destination contains tables with identical names to the source. If identical names exist, an error is returned during precheck and the task cannot start. To handle naming conflicts, use object name mapping to rename the synchronized tables. See Map object names. <br><br> Ignore Errors and Proceed: skips the precheck for identical table names. >
Warning

This option may cause data inconsistency. If the source and destination share the same schema and a record in the destination has the same primary key or unique key as a source record: during full synchronization, DTS retains the existing destination record; during incremental synchronization, DTS overwrites it. If schemas differ, initialization may fail or only partial columns are synchronized.

Capitalization of object names in destination instanceControls the case of database names, table names, and column names in the destination. Default: DTS default policy. See Specify the capitalization of object names in the destination instance.
Source ObjectsSelect one or more tables and click the arrow icon to move them to Selected Objects. Only tables can be selected as synchronization objects.
Selected ObjectsRight-click an object to rename it (single object) or click Batch Edit to rename multiple objects at once. See Map object names. Right-click a table to select specific DML operations for incremental synchronization (INSERT, UPDATE, DELETE) or to set WHERE filter conditions. See Set filter conditions. If you use object name mapping, other objects that depend on the mapped object may fail to synchronize.

Click Next: Advanced Settings.

Step 4: Configure advanced settings

ParameterDescription
Dedicated Cluster for Task SchedulingBy default, DTS schedules the task to the shared cluster. Purchase a dedicated cluster to improve synchronization stability. See What is a DTS dedicated cluster.
Retry Time for Failed ConnectionsHow long DTS retries after a connection failure. Valid values: 10–1,440 minutes. Default: 720 minutes. We recommend that you set this parameter to a value greater than 30 minutes. If DTS reconnects within this window, the task resumes; otherwise, the task fails. If multiple tasks share the same source or destination database, the shortest retry time among those tasks takes effect. DTS charges for the instance during the retry period.
Retry Time for Other IssuesHow long DTS retries after DDL or DML operation failures. Valid values: 1–1,440 minutes. Default: 10 minutes. We recommend that you set this parameter to a value greater than 10 minutes. This value must be smaller than Retry Time for Failed Connections.
Enable Throttling for Full Data SynchronizationLimits read/write resource usage during full data synchronization. Configure QPS (queries per second) to the source database, RPS of Full Data Migration, and Data migration speed for full migration (MB/s). Available only when Full Data Synchronization is selected.
Enable Throttling for Incremental Data SynchronizationLimits resource usage during incremental synchronization. Configure RPS of Incremental Data Synchronization and Data synchronization speed for incremental synchronization (MB/s).
Environment TagAn optional tag to identify the instance by environment type.
Whether to delete SQL operations on heartbeat tables of forward and reverse tasksControls whether DTS writes heartbeat SQL operations to the source database. Yesalert notification settings: does not write heartbeat SQL; the DTS instance may display a latency value. No: writes heartbeat SQL; this may affect features such as physical backup and cloning of the source database.
Configure ETLWhether to enable the extract, transform, and load (ETL) feature. Yes: configure ETL by entering data processing statements in the code editor. See Configure ETL in a data migration or data synchronization task. No: ETL is disabled. See What is ETL?
Monitoring and AlertingWhether to configure alerts. Yes: set the alert threshold and notification contacts; DTS notifies them if the task fails or latency exceeds the threshold. See Configure monitoring and alerting when you create a DTS task. No: no alerts.

Step 5: Run the precheck

Click Next: Save Task Settings and Precheck.

To view the API parameters for this task configuration, hover over Next: Save Task Settings and Precheck and click Preview OpenAPI parameters.

The task runs a precheck before starting. The task can only start after the precheck passes.

  • If any item fails, click View Details next to the failed item, fix the issue, and click Precheck Again.

  • If an item triggers an alert that can be ignored, click Confirm Alert Details, then click Ignore > OK > Precheck Again. Ignoring alert items may cause data inconsistency.

Step 6: Purchase the instance

  1. Wait until the Success Rate reaches 100%, then click Next: Purchase Instance.

  2. On the purchase page, configure the following parameters.

ParameterDescription
Billing MethodSubscription: pay upfront for a fixed duration; more cost-effective for long-term use. Pay-as-you-go: billed hourly; suitable for short-term use. Release the instance when no longer needed to stop billing.
Resource Group SettingsThe resource group for the synchronization instance. Default: default resource group. See What is Resource Management?
Instance ClassThe synchronization performance tier. See Instance classes of data synchronization instances.
Subscription DurationAvailable only for the Subscription billing method. Valid values: 1–9 months, or 1, 2, 3, or 5 years.
  1. Read and select Data Transmission Service (Pay-as-you-go) Service Terms.

  2. Click Buy and Start, then click OK to confirm.

The task appears in the task list. Monitor its progress there.