This topic describes the precautions and limits when you migrate data from a PolarDB-X 2.0 instance. To ensure that your data migration task runs as expected, read the precautions and limits before you configure the task.

Scenarios of migrating data from a PolarDB-X 2.0 instance

Take note of precautions and limits in the following data migration scenarios:

Migrate data from a PolarDB-X 2.0 instance to an ApsaraDB RDS for MySQL instance or a self-managed MySQL database

The following table describes the precautions and limits.
CategoryDescription
Limits on the source database
  • Bandwidth requirements: The server to which the source database belongs must have sufficient outbound bandwidth. Otherwise, the data migration speed is affected.
  • The tables to be migrated must have PRIMARY KEY or UNIQUE constraints, and all fields must be unique. Otherwise, the destination database may contain duplicate data records.
  • If you select tables as the objects to be migrated and you need to modify the tables in the destination database, such as renaming tables or columns, you can migrate up to 1,000 tables in a single data migration task. If you run a task to migrate more than 1,000 tables, a request error occurs. In this case, we recommend that you configure multiple tasks to migrate the tables in batches or configure a task to migrate the entire database.
  • If you need to migrate incremental data, make sure that the following requirements are met:
    • The binary logging feature is enabled. The value of the binlog_row_image parameter is set to full. Otherwise, error messages are returned during precheck and the data migration task cannot be started.
    • If you perform only incremental data migration, the binary logs of the source database must be stored for more than 24 hours. If you perform full data migration and incremental data migration, the binary logs of the source database must be stored for at least seven days. Otherwise, Data Transmission Service (DTS) may fail to obtain the binary logs and the task may fail. In exceptional circumstances, data inconsistency or loss may occur. After full data migration is complete, you can set the retention period to more than 24 hours. Make sure that you set the retention period of binary logs based on the preceding requirements. Otherwise, the Service Level Agreement (SLA) of DTS does not guarantee service reliability or performance.

  • Limits on operations to be performed on the source database:
    • During schema migration and full data migration, do not perform DDL operations to change the schemas of databases or tables. Otherwise, the data migration task fails.
    • If you want to change the network type of the PolarDB-X 2.0 instance during data migration, you must also modify the network connection settings of the data migration task.
    • If you perform only full data migration, do not write data to the source database during data migration. Otherwise, data inconsistency may occur between the source and destination databases. To ensure data consistency, we recommend that you select Schema Migration, Full Data Migration, and Incremental Data Migration as the migration types.
  • The PolarDB-X 2.0 instance must be compatible with MySQL 5.7.
Other limits
  • Before you migrate data, evaluate the impact of data migration on the performance of the source and destination databases. We recommend that you migrate data during off-peak hours. During full data migration, DTS uses the read and write resources of the source and destination databases. This may increase the loads on the database servers.
  • During full data migration, concurrent INSERT operations cause fragmentation in the tables of the destination database. After full data migration is complete, the size of used tablespace of the destination database is larger than that of the source database.
  • DTS attempts to resume data migration tasks that failed within the last seven days. Before you switch workloads to the destination database, you must stop or release the failed tasks. You can also execute the REVOKE statement to revoke the write permissions from the accounts that are used by DTS to access the destination database. Otherwise, the data in the source database overwrites the data in the destination database after a failed task is resumed.
Precautions
  • DTS updates the `dts_health_check`.`ha_health_check` table in the source database as scheduled to move forward the binary log file position.
  • If the destination database runs on an ApsaraDB RDS for MySQL instance, take note of the following limits:

    DTS automatically creates a 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 for an ApsaraDB RDS for MySQL instance.

Migrate data from a PolarDB-X 2.0 instance to a PolarDB for MySQL cluster

The following table describes the precautions and limits.
CategoryDescription
Limits on the source database
  • Bandwidth requirements: The server to which the source database belongs must have sufficient outbound bandwidth. Otherwise, the data migration speed is affected.
  • The tables to be migrated must have PRIMARY KEY or UNIQUE constraints, and all fields must be unique. Otherwise, the destination database may contain duplicate data records.
  • If you select tables as the objects to be migrated and you need to modify the tables in the destination database, such as renaming tables or columns, you can migrate up to 1,000 tables in a single data migration task. If you run a task to migrate more than 1,000 tables, a request error occurs. In this case, we recommend that you configure multiple tasks to migrate the tables in batches or configure a task to migrate the entire database.
  • If you need to migrate incremental data, make sure that the following requirements are met:
    • The binary logging feature is enabled. The value of the binlog_row_image parameter is set to full. Otherwise, error messages are returned during precheck and the data migration task cannot be started.
    • If you perform only incremental data migration, the binary logs of the source database must be stored for more than 24 hours. If you perform full data migration and incremental data migration, the binary logs of the source database must be stored for at least seven days. Otherwise, Data Transmission Service (DTS) may fail to obtain the binary logs and the task may fail. In exceptional circumstances, data inconsistency or loss may occur. After full data migration is complete, you can set the retention period to more than 24 hours. Make sure that you set the retention period of binary logs based on the preceding requirements. Otherwise, the Service Level Agreement (SLA) of DTS does not guarantee service reliability or performance.

  • Limits on operations to be performed on the source database:
    • During schema migration and full data migration, do not perform DDL operations to change the schemas of databases or tables. Otherwise, the data migration task fails.
    • If you want to change the network type of the PolarDB-X 2.0 instance during data migration, you must also modify the network connection settings of the data migration task.
    • If you perform only full data migration, do not write data to the source database during data migration. Otherwise, data inconsistency may occur between the source and destination databases. To ensure data consistency, we recommend that you select Schema Migration, Full Data Migration, and Incremental Data Migration as the migration types.
  • The PolarDB-X 2.0 instance must be compatible with MySQL 5.7.
Other limits
  • Before you migrate data, evaluate the impact of data migration on the performance of the source and destination databases. We recommend that you migrate data during off-peak hours. During full data migration, DTS uses the read and write resources of the source and destination databases. This may increase the loads on the database servers.
  • During full data migration, concurrent INSERT operations cause fragmentation in the tables of the destination database. After full data migration is complete, the size of used tablespace of the destination database is larger than that of the source database.
  • DTS attempts to resume data migration tasks that failed within the last seven days. Before you switch workloads to the destination database, you must stop or release the failed tasks. You can also execute the REVOKE statement to revoke the write permissions from the accounts that are used by DTS to access the destination database. Otherwise, the data in the source database overwrites the data in the destination database after a failed task is resumed.
Precautions
  • DTS updates the `dts_health_check`.`ha_health_check` table in the source database as scheduled to move forward the binary log file position.
  • If the destination database runs on a PolarDB for MySQL cluster, take note of the following limits:

    DTS automatically creates a database in the PolarDB for MySQL cluster. However, if the name of the source database is invalid, you must manually create a database in the PolarDB for MySQL cluster before you configure the data migration task. For more information, see Database Management.

Migrate data between PolarDB-X 2.0 instances

The following table describes the precautions and limits.
CategoryDescription
Limits on the source database
  • Bandwidth requirements: The server to which the source database belongs must have sufficient outbound bandwidth. Otherwise, the data migration speed is affected.
  • The tables to be migrated must have PRIMARY KEY or UNIQUE constraints, and all fields must be unique. Otherwise, the destination database may contain duplicate data records.
  • If you select tables as the objects to be migrated and you need to modify the tables in the destination database, such as renaming tables or columns, you can migrate up to 1,000 tables in a single data migration task. If you run a task to migrate more than 1,000 tables, a request error occurs. In this case, we recommend that you configure multiple tasks to migrate the tables in batches or configure a task to migrate the entire database.
  • If you need to migrate incremental data, make sure that the following requirements are met:
    • The binary logging feature is enabled. The value of the binlog_row_image parameter is set to full. Otherwise, error messages are returned during precheck and the data migration task cannot be started.
    • If you perform only incremental data migration, the binary logs of the source database must be stored for more than 24 hours. If you perform full data migration and incremental data migration, the binary logs of the source database must be stored for at least seven days. Otherwise, Data Transmission Service (DTS) may fail to obtain the binary logs and the task may fail. In exceptional circumstances, data inconsistency or loss may occur. After full data migration is complete, you can set the retention period to more than 24 hours. Make sure that you set the retention period of binary logs based on the preceding requirements. Otherwise, the Service Level Agreement (SLA) of DTS does not guarantee service reliability or performance.

  • Limits on operations to be performed on the source database:
    • During schema migration and full data migration, do not perform DDL operations to change the schemas of databases or tables. Otherwise, the data migration task fails.
    • If you want to change the network type of the PolarDB-X 2.0 instance during data migration, you must also modify the network connection settings of the data migration task.
    • If you perform only full data migration, do not write data to the source database during data migration. Otherwise, data inconsistency may occur between the source and destination databases. To ensure data consistency, we recommend that you select Schema Migration, Full Data Migration, and Incremental Data Migration as the migration types.
  • The PolarDB-X 2.0 instance must be compatible with MySQL 5.7.
Other limits
  • The destination PolarDB-X 2.0 instance must be compatible with MySQL 5.7.
  • Before you migrate data, evaluate the impact of data migration on the performance of the source and destination databases. We recommend that you migrate data during off-peak hours. During full data migration, DTS uses the read and write resources of the source and destination databases. This may increase the loads on the database servers.
  • During full data migration, concurrent INSERT operations cause fragmentation in the tables of the destination database. After full data migration is complete, the size of used tablespace of the destination database is larger than that of the source database.
  • DTS attempts to resume data migration tasks that failed within the last seven days. Before you switch workloads to the destination database, you must stop or release the failed tasks. You can also execute the REVOKE statement to revoke the write permissions from the accounts that are used by DTS to access the destination database. Otherwise, the data in the source database overwrites the data in the destination database after a failed task is resumed.
PrecautionsDTS updates the `dts_health_check`.`ha_health_check` table in the source database as scheduled to move forward the binary log file position.

Migrate data from a PolarDB-X 2.0 instance to an AnalyticDB for MySQL V3.0 cluster

The following table describes the precautions and limits.
CategoryDescription
Limits on the source database
  • Bandwidth requirements: The server to which the source database belongs must have sufficient outbound bandwidth. Otherwise, the data migration speed is affected.
  • The tables to be migrated must have PRIMARY KEY or UNIQUE constraints, and all fields must be unique. Otherwise, the destination database may contain duplicate data records.
  • If you select tables as the objects to be migrated and you need to modify the tables in the destination database, such as renaming tables or columns, you can migrate up to 1,000 tables in a single data migration task. If you run a task to migrate more than 1,000 tables, a request error occurs. In this case, we recommend that you configure multiple tasks to migrate the tables in batches or configure a task to migrate the entire database.
  • If you need to migrate incremental data, make sure that the following requirements are met:
    • The binary logging feature is enabled. The value of the binlog_row_image parameter is set to full. Otherwise, error messages are returned during precheck and the data migration task cannot be started.
    • If you perform only incremental data migration, the binary logs of the source database must be stored for more than 24 hours. If you perform full data migration and incremental data migration, the binary logs of the source database must be stored for at least seven days. Otherwise, Data Transmission Service (DTS) may fail to obtain the binary logs and the task may fail. In exceptional circumstances, data inconsistency or loss may occur. After full data migration is complete, you can set the retention period to more than 24 hours. Make sure that you set the retention period of binary logs based on the preceding requirements. Otherwise, the Service Level Agreement (SLA) of DTS does not guarantee service reliability or performance.

  • Limits on operations to be performed on the source database:
    • During schema migration and full data migration, do not perform DDL operations to change the schemas of databases or tables. Otherwise, the data migration task fails.
    • If you want to change the network type of the PolarDB-X 2.0 instance during data migration, you must also modify the network connection settings of the data migration task.
    • If you perform only full data migration, do not write data to the source database during data migration. Otherwise, data inconsistency may occur between the source and destination databases. To ensure data consistency, we recommend that you select Schema Migration, Full Data Migration, and Incremental Data Migration as the migration types.
  • The PolarDB-X 2.0 instance must be compatible with MySQL 5.7.
Other limits
  • Prefix indexes cannot be migrated. If the source database contains prefix indexes, data may fail to be migrated.
  • Due to the limits of AnalyticDB for MySQL V3.0 clusters, if the disk space usage of nodes in an AnalyticDB for MySQL V3.0 cluster reaches 80%, the data migration task is delayed and error messages are returned. We recommend that you estimate the required disk space based on the objects to be migrated. You must make sure that the destination cluster has sufficient storage space.
  • Before you migrate data, evaluate the impact of data migration on the performance of the source and destination databases. We recommend that you migrate data during off-peak hours. During full data migration, DTS uses the read and write resources of the source and destination databases. This may increase the loads on the database servers.
  • During full data migration, concurrent INSERT operations cause fragmentation in the tables of the destination database. After full data migration is complete, the size of used tablespace of the destination database is larger than that of the source database.
  • DTS attempts to resume data migration tasks that failed within the last seven days. Before you switch workloads to the destination database, you must stop or release the failed tasks. You can also execute the REVOKE statement to revoke the write permissions from the accounts that are used by DTS to access the destination database. Otherwise, the data in the source database overwrites the data in the destination database after a failed task is resumed.
PrecautionsDTS updates the `dts_health_check`.`ha_health_check` table in the source database as scheduled to move forward the binary log file position.

Migrate data from a PolarDB-X 2.0 instance to a Message Queue for Apache Kafka instance

CategoryDescription
Limits on the source database
  • Bandwidth requirements: The server to which the source database belongs must have sufficient outbound bandwidth. Otherwise, the data migration speed is affected.
  • The tables to be migrated must have PRIMARY KEY or UNIQUE constraints, and all fields must be unique. Otherwise, the destination database may contain duplicate data records.
  • If you select tables as the objects to be migrated and you need to modify the tables in the destination database, such as renaming tables or columns, you can migrate up to 1,000 tables in a single data migration task. If you run a task to migrate more than 1,000 tables, a request error occurs. In this case, we recommend that you configure multiple tasks to migrate the tables in batches or configure a task to migrate the entire database.
  • If you need to migrate incremental data, make sure that the following requirements are met:
    • The binary logging feature is enabled. The value of the binlog_row_image parameter is set to full. Otherwise, error messages are returned during precheck and the data migration task cannot be started.
    • If you perform only incremental data migration, the binary logs of the source database must be stored for more than 24 hours. If you perform full data migration and incremental data migration, the binary logs of the source database must be stored for at least seven days. Otherwise, Data Transmission Service (DTS) may fail to obtain the binary logs and the task may fail. In exceptional circumstances, data inconsistency or loss may occur. After full data migration is complete, you can set the retention period to more than 24 hours. Make sure that you set the retention period of binary logs based on the preceding requirements. Otherwise, the Service Level Agreement (SLA) of DTS does not guarantee service reliability or performance.

  • Limits on operations to be performed on the source database:
    • During schema migration and full data migration, do not perform DDL operations to change the schemas of databases or tables. Otherwise, the data migration task fails.
    • If you want to change the network type of the PolarDB-X 2.0 instance during data migration, you must also modify the network connection settings of the data migration task.
    • If you perform only full data migration, do not write data to the source database during data migration. Otherwise, data inconsistency may occur between the source and destination databases. To ensure data consistency, we recommend that you select Schema Migration, Full Data Migration, and Incremental Data Migration as the migration types.
  • The PolarDB-X 2.0 instance must be compatible with MySQL 5.7.
Other limits
  • Before you migrate data, evaluate the impact of data migration on the performance of the source and destination databases. We recommend that you migrate data during off-peak hours. During full data migration, DTS uses the read and write resources of the source and destination databases. This may increase the loads on the database servers.
  • During full data migration, concurrent INSERT operations cause fragmentation in the tables of the destination database. After full data migration is complete, the size of used tablespace of the destination database is larger than that of the source database.
  • DTS attempts to resume data migration tasks that failed within the last seven days. Before you switch workloads to the destination database, you must stop or release the failed tasks. You can also execute the REVOKE statement to revoke the write permissions from the accounts that are used by DTS to access the destination database. Otherwise, the data in the source database overwrites the data in the destination database after a failed task is resumed.
PrecautionsDTS updates the `dts_health_check`.`ha_health_check` table in the source database as scheduled to move forward the binary log file position.

Migrate data from a PolarDB-X 2.0 instance to an Elasticsearch cluster

CategoryDescription
Limits on the source database
  • Bandwidth requirements: The server to which the source database belongs must have sufficient outbound bandwidth. Otherwise, the data migration speed is affected.
  • The tables to be migrated must have PRIMARY KEY or UNIQUE constraints, and all fields must be unique. Otherwise, the destination database may contain duplicate data records.
  • If you select tables as the objects to be migrated and you need to modify the tables in the destination database, such as renaming tables or columns, you can migrate up to 1,000 tables in a single data migration task. If you run a task to migrate more than 1,000 tables, a request error occurs. In this case, we recommend that you configure multiple tasks to migrate the tables in batches or configure a task to migrate the entire database.
  • If you need to migrate incremental data, make sure that the following requirements are met:
    • The binary logging feature is enabled. The value of the binlog_row_image parameter is set to full. Otherwise, error messages are returned during precheck and the data migration task cannot be started.
    • If you perform only incremental data migration, the binary logs of the source database must be stored for more than 24 hours. If you perform full data migration and incremental data migration, the binary logs of the source database must be stored for at least seven days. Otherwise, Data Transmission Service (DTS) may fail to obtain the binary logs and the task may fail. In exceptional circumstances, data inconsistency or loss may occur. After full data migration is complete, you can set the retention period to more than 24 hours. Make sure that you set the retention period of binary logs based on the preceding requirements. Otherwise, the Service Level Agreement (SLA) of DTS does not guarantee service reliability or performance.

  • Limits on operations to be performed on the source database:
    • During schema migration and full data migration, do not perform DDL operations to change the schemas of databases or tables. Otherwise, the data migration task fails.
    • If you want to change the network type of the PolarDB-X 2.0 instance during data migration, you must also modify the network connection settings of the data migration task.
    • If you perform only full data migration, do not write data to the source database during data migration. Otherwise, data inconsistency may occur between the source and destination databases. To ensure data consistency, we recommend that you select Schema Migration, Full Data Migration, and Incremental Data Migration as the migration types.
  • The PolarDB-X 2.0 instance must be compatible with MySQL 5.7.
Other limits
  • If you want to add columns to a table in the source database, modify the mappings of the index that corresponds to the table in the Elasticsearch cluster. Then, perform DDL operations on the source table, pause the data migration task, and then start the task again.
  • Before you migrate data, evaluate the impact of data migration on the performance of the source and destination databases. We recommend that you migrate data during off-peak hours. During full data migration, DTS uses the read and write resources of the source and destination databases. This may increase the loads on the database servers.
  • During full data migration, concurrent INSERT operations cause fragmentation in the tables of the destination database. After full data migration is complete, the size of used tablespace of the destination database is larger than that of the source database.
  • DTS attempts to resume data migration tasks that failed within the last seven days. Before you switch workloads to the destination database, you must stop or release the failed tasks. You can also execute the REVOKE statement to revoke the write permissions from the accounts that are used by DTS to access the destination database. Otherwise, the data in the source database overwrites the data in the destination database after a failed task is resumed.
PrecautionsDTS updates the `dts_health_check`.`ha_health_check` table in the source database as scheduled to move forward the binary log file position.