The data synchronization feature of Data Transmission Service (DTS) is easy to use. You can configure a data synchronization task in just a few steps in the new DTS console.
Usage notes
This topic provides a general procedure for configuring a data synchronization task. The procedure varies depending on the source and destination databases. For the specific configuration steps for a synchronization topology, see the related topics in Overview of data synchronization scenarios.
This topic uses one-way synchronization between RDS for MySQL instances as an example. The parameter settings are for reference only. The actual user interface (UI) in the console prevails.
Preparations
If the source or destination database is a self-managed database, you must prepare the required environments for DTS. For more information, see Preparations.
ta-node="1359199" data-root="17160" data-tag="xref" href="t1359199.xdita#" id="03f2d94a068e7">Preparations.You have created the source and destination database instances and confirmed that their versions are supported by DTS. For more information about the supported databases and versions, see Overview of data synchronization scenarios.
versions, see Overview of data synchronization scenarios.
Procedure
Go to the data synchronization task list page in the destination region. You can do this in one of two ways.
DTS console
Log on to the DTS console.
In the navigation pane on the left, click Data Synchronization.
In the upper-left corner of the page, select the region where the synchronization instance is located.
DMS console
NoteThe actual steps may vary depending on the mode and layout of the DMS console. For more information, see Simple mode console and Customize DMS console layout and style.
Log on to the DMS console.
In the top menu bar, choose .
To the right of Data Synchronization Tasks, select the region of the synchronization instance.
Click Create Task to open the task configuration page.
Optional: In the upper-right corner of the page, click New Configuration Page.
NoteIf you are already on the new configuration page (the button in the upper-right corner is Back to Previous Version), you can skip this step.
Some parameters differ between the new and old configuration pages. We recommend using the new version.
Configure the source and destination databases.
1">WarningAfter you select the source and destination instances, review the Limits at the top of the page. Otherwise, the task may fail or data inconsistency may occur.
Category
Configuration
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 need to be unique.
Source Database
Select Existing Connection
In this example, you do not need to select an existing connection. Enter the database information in the following sections.
Database Type
Select MySQL.
Access Method
Select Alibaba Cloud Instance.
Instance Region
Select the region where the source RDS for MySQL instance resides.
Replicate Data Across Alibaba Cloud Accounts
For this example, select No, as the database instance belongs to the current Alibaba Cloud account.
RDS Instance ID
Select the ID of the source RDS for MySQL instance.
Database Account
Enter the database account of the source RDS for MySQL instance. The account must have the REPLICATION CLIENT and REPLICATION SLAVE permissions, and the SELECT permission on the objects to synchronize.
Database Password
Enter the password for the specified database account.
Encryption
In this example, you do not need to select a connection method. Keep the default setting.
Destination Database
Select Existing Connection
For this example, enter the database information in the fields below.
Database Type
Select MySQL.
Access Method
Select Alibaba Cloud Instance.
Instance Region
Select the region where the destination RDS for MySQL instance resides.
Replicate Data Across Alibaba Cloud Accounts
For this example, select No, as the database instance belongs to the current Alibaba Cloud account.
RDS Instance ID
Select the ID of the destination RDS for MySQL instance.
Database Account
Enter the database account of the destination RDS for MySQL instance. The account must have read and write permissions.
Database Password
Enter the password for the specified database account.
Encryption
For this example, you can use the default options.
For this example, you can use the default options.
After completing the configuration, click Test Connectivity and Proceed at the bottom of the page.
Ensure that you add the CIDR blocks of the DTS servers (either automatically or manually) to the security settings of both the source and destination databases to allow access. For more information, see Add the IP address whitelist of DTS servers.
If the source or destination is a self-managed database (i.e., the Access Method is not Alibaba Cloud Instance), you must also click Test Connectivity in the CIDR Blocks of DTS Servers dialog box.
Configure the task objects.
On the Configure Objects page, specify the objects to synchronize.
In this example, select Schema Synchronization, Full Data Synchronization, and Incremental Data Synchronization for Synchronization Types. Then, select the objects to synchronize in the Source Objects box. Keep the default settings for the other parameters, or configure them as needed.
Click Next: Advanced Settings.
In this example, the default settings are used. You can also configure the parameters as needed.
Click Data Verification to configure a data verification task.
To use the data verification feature, see Configure data verification.
If a non-connection issue (e.g., a DDL or DML execution error) occurs, DTS reports an error and immediately retries the operation. The default retry duration is 10 minutes. You can also customize the retry time to a value from 1 to 1,440 minutes. We recommend a duration of 10 minutes or more. If the related operations succeed within the set retry time, the synchronization task automatically resumes. Otherwise, the task fails.
The value of Retry Time for Other Issues must be less than that of Retry Time for Failed Connections.
Enable Throttling for Full Data Synchronization
During full data synchronization, DTS consumes read and write resources from the source and destination databases, which can increase their load. To mitigate pressure on the destination database, you can limit the migration rate by setting Queries per second (QPS) to the source database, RPS of Full Data Migration, and Data migration speed for full migration (MB/s).
This parameter is available only if Synchronization Types is set to Full Data Synchronization.
You can also adjust the rate of full data synchronization when the synchronization instance is running.
Enable Throttling for Incremental Data Synchronization
You can also limit the incremental synchronization rate to reduce pressure on the destination database by setting 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.
Whether to delete SQL operations on heartbeat tables of forward and reverse tasks
Choose whether DTS writes heartbeat SQL information to the source database while the instance is running.
Yes: Does not write heartbeat SQL information to the source database. The DTS instance may display latency.
No: Writes heartbeat SQL information to the source database. This may interfere with source database operations like physical backups and cloning.
Configure ETL
Choose whether to enable the extract, transform, and load (ETL) feature. For more information, see What is ETL? Valid values:
-
Yes: Enables the ETL feature. Enter data processing statements in the code editor. For more information, see Configure ETL in a data migration or data synchronization task.
-
No: Disables the ETL feature.
Monitoring and Alerting
Choose whether to set up alerts. If the synchronization fails or the latency exceeds the specified threshold, DTS sends a notification to the alert contacts.
No: No alerts are configured.
Yes: Configures alerts. You must also set the alert threshold and alert notifications. For more information, see Configure monitoring and alerting during task configuration.
Choose whether to set up alerts. If the synchronization fails or the latency exceeds the specified threshold, DTS sends a notification to the alert contacts.
No: No alerts are configured.
Yes: Configures alerts. You must also set the alert threshold and alert notifications. For more information, see Configure monitoring and alerting during task configuration.
Click Data Verification to configure a data verification task.
To use the data verification feature, see Configure data verification.
Save the task and perform a precheck.
To view the parameters for configuring this instance via an API operation, hover over the Next: Save Task Settings and Precheck button and click Preview OpenAPI parameters in the tooltip.
If you have finished viewing the API parameters, click Next: Save Task Settings and Precheck at the bottom of the page.
Before a synchronization task starts, DTS performs a precheck. You can start the task only if the precheck passes.
If the precheck fails, click View Details next to the failed item, fix the issue as prompted, and then rerun the precheck.
If the precheck generates warnings:
For non-ignorable warning, click View Details next to the item, fix the issue as prompted, and run the precheck again.
For ignorable warnings, you can bypass them by clicking Confirm Alert Details, then Ignore, and then OK. Finally, click Precheck Again to skip the warning and run the precheck again. Ignoring precheck warnings may lead to data inconsistencies and other business risks. Proceed with caution.
Purchase the instance.
When the Success Rate reaches 100%, click Next: Purchase Instance.
On the Purchase page, select the billing method and link specifications for the data synchronization instance. For more information, see the following table.
Category
Parameter
Description
New Instance Class
Billing Method
Subscription: You pay upfront for a specific duration. This is cost-effective for long-term, continuous tasks.
Pay-as-you-go: You are billed hourly for actual usage. This is ideal for short-term or test tasks, as you can release the instance at any time to save costs.
Resource Group Settings
The resource group to which the instance belongs. The default is default resource group. For more information, see What is resource management?.
Instance Class
DTS offers synchronization specifications at different performance levels that affect the synchronization rate. Select a specification based on your business requirements. For more information, see Data synchronization link specifications.
Subscription Duration
In subscription mode, select the duration and quantity of the instance. Monthly options range from 1 to 9 months. Yearly options include 1, 2, 3, or 5 years.
NoteThis option appears only when the billing method is Subscription.
Read and select the checkbox for Data Transmission Service (Pay-as-you-go) Service Terms.
Click Buy and Start, and then click OK in the OK dialog box.
You can monitor the task progress on the data synchronization page.
to move them to the Selected Objects box.