This topic describes how to migrate data between PolarDB for MySQL clusters by using Data Transmission Service (DTS).
Prerequisites
- The source and destination PolarDB for MySQL clusters are created. For more information, see Purchase a pay-as-you-go cluster and Purchase a subscription cluster.
- The available storage space of the destination PolarDB for MySQL cluster is larger than the total size of the data in the source PolarDB for MySQL cluster.
Limits
Category | Description |
---|---|
Limits on the source database |
|
Other limits |
|
Usage notes |
DTS executes the CREATE DATABASE IF NOT EXISTS `test` statement in the source database as scheduled to move forward the binary log file position. |
Billing
Migration type | Instance 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. |
Incremental data migration | Charged. For more information, see Billing overview. |
Migration types
- Schema migration
Data Transmission Service (DTS) migrates the schemas of required objects from the source database to the destination database.
Note- DTS supports schema migration for the following types of objects: table, view, trigger, stored procedure, and function.
- During schema migration, DTS changes the value of the SECURITY attribute from DEFINER to INVOKER for views, stored procedures, and functions.
- DTS does not migrate user information. To call a view, stored procedure, or function of the destination database, you must grant the read and write permissions to INVOKER.
- Full data migration
DTS migrates historical data of required objects from the source database to the destination database.
- Incremental data migration
After full data migration is complete, DTS migrates incremental data from the source database to the destination database. Incremental data migration allows you to ensure service continuity when you migrate data between self-managed databases.
SQL operations that can be incrementally migrated
Operation type | SQL statement |
---|---|
DML | INSERT, UPDATE, and DELETE |
DDL |
|
Permissions required for database accounts
Database | Required permission |
---|---|
Source PolarDB for MySQL cluster | Read permissions on the objects to be migrated |
Destination PolarDB for MySQL cluster | Read and write permissions on the objects to be migrated |