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
-
Log in to the DTS console.
NoteIf you are automatically redirected to the Data Management (DMS) console, you can click the
icon in the lower-right corner and then click
to return to the classic DTS console. -
In the left-side navigation pane, click Data Migration.
-
At the top of the Migration Tasks page, select the region of your destination instance.
-
In the upper-right corner of the page, click Create Data Migration Task.
-
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.
-
After you complete the configuration, click Authorize Whitelist and Go to Next Step.
NoteIf 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.
-
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.
NoteTo 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.
NoteYou 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.
NoteIf 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.
NoteThis option may cause table locks on the destination database.
-
-
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.
-
-
-
After the task passes the precheck, click Next.
-
On the Confirm Settings page, choose a Instance Class and select the Data Transmission Service (Pay-As-You-Go) Terms of Service checkbox.
-
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.
-
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.
-
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.
-
-