You can use Data Transmission Service (DTS) to migrate data from a PolarDB for MySQL cluster to a self-managed MySQL database or an ApsaraDB RDS for MySQL instance.
Supported destination databases
You can use DTS to migrate data from a PolarDB for MySQL cluster to the following types of self-managed MySQL databases in addition to an ApsaraDB RDS for MySQL instance:- Self-managed database with a public IP address
- Self-managed database that is hosted on Elastic Compute Service (ECS)
- Self-managed database that is connected over Express Connect, VPN Gateway, or Smart Access Gateway
- Self-managed database that is connected over Database Gateway
Prerequisites
- The source PolarDB for MySQL cluster is created. For more information, see Purchase a pay-as-you-go cluster and Purchase a subscription cluster.
- The available storage space of the destination ApsaraDB RDS for MySQL instance is larger than the total size of the data in the source PolarDB for MySQL cluster.
Limits
Category | Description |
---|---|
Limits on the source database |
|
Usage notes |
|
Special cases | If you migrate data to an ApsaraDB RDS for MySQL instance, DTS automatically creates a destination database in the ApsaraDB RDS for MySQL instance. However, if the name of the source database is invalid, you must manually create a database in the ApsaraDB RDS for MySQL instance before you configure the data migration task. For more information, see Create a database. |
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 | References |
---|---|---|
PolarDB for MySQL cluster | Read permissions on the objects to be migrated | Create a database account |
ApsaraDB RDS for MySQL instance | Read and write permissions on the objects to be migrated | Create an account on an ApsaraDB RDS for MySQL instance |