This topic describes how to migrate data from an ApsaraDB RDS for MySQL instance to an Elasticsearch cluster by using Data Transmission Service (DTS).
Prerequisites
- The destination Elasticsearch cluster is created. For more information, see Create an Alibaba Cloud Elasticsearch cluster.
- The available storage space of the destination Elasticsearch cluster is larger than the total size of the data in the ApsaraDB RDS for MySQL instance. This ensures a successful full data migration.
Limits
Category | Description |
---|---|
Limits on the source instance |
|
Other limits |
|
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 Pricing. |
Incremental data migration | Charged. For more information, see Pricing. |
Migration types
- Schema migration
DTS migrates the schemas of required objects from the source database to the destination database.
- 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 support incremental data migration
Operation type | SQL statement |
---|---|
DML | INSERT, UPDATE, and DELETE |
Data type mappings
The data types of MySQL databases and Elasticsearch clusters do not have one-to-one correspondence. During initial schema synchronization, DTS converts the data types of the source database into the data types of the destination database. For more information, see Data type mappings between heterogeneous databases.
Permissions required for database accounts
Database type | Schema migration | Full data migration | Incremental data migration | References |
---|---|---|---|---|
ApsaraDB RDS for MySQL instance | The SELECT permission | The SELECT permission | The REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW, and SELECT permissions | Create an account on an ApsaraDB RDS for MySQL instance |
Elasticsearch instance | The database account must have the read and write permissions on the objects to be migrated. The default database account in Elasticsearch clusters is elastic. |