This topic describes how to configure a data integration task between ApsaraDB RDS for MySQL instances.
- You cannot configure data integration tasks in the new Data Transmission Service (DTS) console. To configure the tasks, log on to the Data Management (DMS) console. For more information, see Overview.
- All databases that support full data migration support the data integration feature. For more information, see Overview of data migration scenarios.
Prerequisites
ApsaraDB RDS for MySQL instances are created and used as the source and destination instances. For more information, see Create an ApsaraDB RDS for MySQL instance.
Background information
DTS provides the data integration feature. The feature allows you to configure a scheduling policy to migrate schemas and historical data from the source database to the destination database on a regular basis. The data integration feature allows you to flexibly build data warehouses. For more information, see Scheduling policies of data integration.
Limits
The source database must have PRIMARY KEY or UNIQUE constraints and all fields must be unique. Otherwise, the destination database may contain duplicate data records.
Limits
- DTS supports the following types of objects for schema migration: table, view, trigger, stored procedure, and function. Note During schema migration, DTS changes the value of the SECURITY attribute from
DEFINER
toINVOKER
for views, stored procedures, and functions. - DTS does not migrate user information from the source database. After data migration is complete, if you want to call a view, stored procedure, or function of the destination database, you must grant the read and write permissions to INVOKER.
Billing
Migration type | Task configuration fee | Internet traffic fee |
---|---|---|
Schema migration and full data migration | Free of charge. | Charged only when data is migrated from Alibaba Cloud over the Internet. For more information, see Billing overview. |
Procedure
In this example, a data integration task is configured between ApsaraDB RDS for MySQL instances that reside in the China (Qingdao) region.
- Log on to the DTS console. Note
- If you are redirected to the Data Management (DMS) console, you can move the pointer over the
icon in the lower-right corner and click the
icon to go to the previous version of the DTS console.
- If you are redirected to the new DTS console, you can click the
icon in the lower-right corner to go to the previous version of the DTS console.
- If you are redirected to the Data Management (DMS) console, you can move the pointer over the
- In the left-side navigation pane, click Data Integration.
- At the top of the Migration Tasks page, select the region in which the destination instance resides. In this example, the China (Qingdao) region is selected.
- In the upper-right corner of the page, click Create Data Integration Task.
- Configure the source and destination databases.
Section Parameter Description N/A Task Name The task name that DTS automatically generates. We recommend that you specify a descriptive name that makes it easy to identify the task. You do not need to specify a unique task name. Source Database Instance Type The instance type of the source database. Select RDS Instance. Instance Region The region in which the source ApsaraDB RDS for MySQL instance resides. In this example, China (Qingdao) is selected. Database Account The database account of the source ApsaraDB RDS for MySQL instance. The account must have the read and write permissions on the source database. Note For more information about how to create a database account and grant the permissions to the account, see Create an account on the ApsaraDB RDS for MySQL instance.Database Password The password of the database account. Note After you specify the source database parameters, click Test Connectivity next to the Database Password parameter to verify whether the specified parameters are valid. If the specified parameters are valid, the Passed message is displayed. If the Failed message is displayed, click Check next to Failed. Modify the source database parameters based on the check results.Encryption Specifies whether to encrypt the connection to the source instance. Select Non-encrypted or SSL-encrypted. If you select SSL-encrypted, you must enable SSL encryption for the ApsaraDB RDS for MySQL instance before you configure the data integration task. For more information, see Configure SSL encryption for an ApsaraDB RDS for MySQL instance. Note The Encryption parameter is available only for regions in the Chinese mainland and the China (Hong Kong) region.Destination Database Instance Type The instance type of the destination database. Select RDS Instance. Instance Region The region in which the destination ApsaraDB RDS for MySQL instance resides. In this example, China (Qingdao) is selected. Database Account The database account of the destination ApsaraDB RDS for MySQL instance. The account must have the read and write permissions on the destination database. Note For more information about how to create a database account and grant the permissions to the account, see Create an account on the ApsaraDB RDS for MySQL instance.Database Password The password of the database account. Note After you specify the destination database parameters, click Test Connectivity next to the Database Password parameter to verify whether the specified parameters are valid. If the specified parameters are valid, the Passed message is displayed. If the Failed message is displayed, click Check next to Failed. Modify the destination database parameters based on the check results.Encryption Specifies whether to encrypt the connection to the destination instance. Select Non-encrypted or SSL-encrypted. If you select SSL-encrypted, you must enable SSL encryption for the ApsaraDB RDS for MySQL instance before you configure the data integration task. For more information, see Configure SSL encryption for an ApsaraDB RDS for MySQL instance. Note The Encryption parameter is available only for regions in the Chinese mainland and the China (Hong Kong) region. - In the lower-right corner of the page, click Set Whitelist and Next.
- Configure a scheduling policy and select the objects to be migrated.
- In the lower-right corner of the page, click Precheck. Note
- Before you can start the data migration task, DTS performs a precheck. You can start the data migration task only after the task passes the precheck.
- If the task fails to pass the precheck, you can click the
icon next to each failed item to view details.
- You can troubleshoot the issues based on the causes and run a precheck again.
- If you do not need to troubleshoot the issues, you can ignore failed items and run a precheck again.
- After the task passes the precheck, click Next.
- In the Confirm Settings dialog box, specify the Channel Specification parameter and select Data Transmission Service (Pay-As-You-Go) Service Terms.
- Click Buy and Start. The data integration task runs based on the specified scheduled time. Note The data integration task automatically stops at the end of the scheduled time. To stop the task before the end time of the schedule, click Stop data integration task.
Result
If a task is completed before the end of the current scheduled time, the task status changes to Completed. DTS waits for the next scheduled time and performs full data migration again.
