This topic describes the precautions and limits when you migrate data from a PolarDB for MySQL cluster. 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 for MySQL cluster

You can view the precautions and limits based on the following migration scenarios:

Migrate data between PolarDB for MySQL clusters

The following table describes the usage notes and limits.
Category Description
Limits on the source database
  • The server to which the source database belongs must have sufficient outbound bandwidth. Otherwise, the data migration speed decreases.
  • The tables to migrate 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 edit tables, such as renaming tables or columns in the destination database, up to 1,000 tables can be migrated 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.
  • The binary logging feature must be enabled. The loose_polar_log_bin parameter must be set to on. Otherwise, error messages are returned during precheck and the data migration task cannot be started.
    Note

    For an incremental data migration task, binary logs of the source database must be stored for more than 24 hours. For a full data and incremental data migration task, binary logs of the source database must be stored for at least seven days. After full data migration is complete, you can set the retention period to more than 24 hours. 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. Make sure that you set the retention period of binary logs based on the preceding requirements. Otherwise, the service reliability and performance stated in the Service Level Agreement (SLA) of DTS cannot be achieved.

  • Limits on operations that are 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 perform only full data migration, do not write data to the source database during data migration. Otherwise, data inconsistency between the source and destination databases occurs. To ensure data consistency, we recommend that you select schema migration, full data migration, and incremental data migration as the migration types.
Other limits
  • To ensure compatibility, we recommend that you use the same MySQL version for the source and destination PolarDB for MySQL clusters.
  • Read-only nodes of the source PolarDB for MySQL cluster cannot be migrated.
  • 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 of 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.
  • You must make sure that the precision settings for columns of the FLOAT or DOUBLE data type meet your business requirements. DTS uses the ROUND(COLUMN,PRECISION) function to retrieve values from columns of the FLOAT or DOUBLE data type. If you do not specify a precision, DTS sets the precision for the FLOAT data type to 38 digits and the precision for the DOUBLE data type to 308 digits.
  • DTS attempts to resume data migration tasks that failed within the last seven days. Before you switch workloads to the destination database, stop or release the data migration task. You can also execute the REVOKE statement to revoke the write permissions from the accounts used by DTS to access the destination database. Otherwise, the data in the source database will overwrite the data in the destination database after the task is resumed.
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.

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

The following table describes the usage notes and limits.
Category Description
Limits on the source database
  • The server to which the source database belongs must have sufficient outbound bandwidth. Otherwise, the data migration speed decreases.
  • The tables to migrate 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 edit tables, such as renaming tables or columns in the destination database, up to 1,000 tables can be migrated 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.
  • The binary logging feature must be enabled. The loose_polar_log_bin parameter must be set to on. Otherwise, error messages are returned during precheck and the data migration task cannot be started.
    Note

    For an incremental data migration task, binary logs of the source database must be stored for more than 24 hours. For a full data and incremental data migration task, binary logs of the source database must be stored for at least seven days. After full data migration is complete, you can set the retention period to more than 24 hours. 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. Make sure that you set the retention period of binary logs based on the preceding requirements. Otherwise, the service reliability and performance stated in the Service Level Agreement (SLA) of DTS cannot be achieved.

  • Limits on operations that are 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 perform only full data migration, do not write data to the source database during data migration. Otherwise, data inconsistency between the source and destination databases occurs. To ensure data consistency, we recommend that you select schema migration, full data migration, and incremental data migration as the migration types.
Usage notes
  • Read-only nodes of the source PolarDB for MySQL cluster cannot be migrated.
  • 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 of 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.
  • You must make sure that the precision settings for columns of the FLOAT or DOUBLE data type meet your business requirements. DTS uses the ROUND(COLUMN,PRECISION) function to retrieve values from columns of the FLOAT or DOUBLE data type. If you do not specify a precision, DTS sets the precision for the FLOAT data type to 38 digits and the precision for the DOUBLE data type to 308 digits.
  • DTS attempts to resume data migration tasks that failed within the last seven days. Before you switch workloads to the destination database, stop or release the data migration task. You can also execute the REVOKE statement to revoke the write permissions from the accounts used by DTS to access the destination database. Otherwise, the data in the source database will overwrite the data in the destination database after the task is resumed.
  • DTS executes the CREATE DATABASE IF NOT EXISTS `test` statement in the source database as scheduled to move forward the binary log file position.
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.

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

The following table describes the usage notes and limits.
Category Description
Limits on the source database
  • The server to which the source database belongs must have sufficient outbound bandwidth. Otherwise, the data migration speed decreases.
  • The tables to migrate 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 edit tables, such as renaming tables or columns in the destination database, up to 1,000 tables can be migrated 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.
  • The binary logging feature must be enabled. The loose_polar_log_bin parameter must be set to on. Otherwise, error messages are returned during precheck and the data migration task cannot be started.
    Note

    For an incremental data migration task, binary logs of the source database must be stored for more than 24 hours. For a full data and incremental data migration task, binary logs of the source database must be stored for at least seven days. After full data migration is complete, you can set the retention period to more than 24 hours. 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. Make sure that you set the retention period of binary logs based on the preceding requirements. Otherwise, the service reliability and performance stated in the Service Level Agreement (SLA) of DTS cannot be achieved.

  • Limits on operations that are performed on the source database:
    • During full data migration, do not perform DDL operations to change the schemas of databases or tables. Otherwise, the data migration task fails.
    • If you perform only full data migration, do not write data to the source database during data migration. Otherwise, data inconsistency between the source and destination databases occurs. To ensure data consistency, we recommend that you select full data migration and incremental data migration as the migration types.
    • Incremental DDL operations cannot be migrated. If you perform DDL operations in the source database during incremental data migration, the data migration task fails. If you need to perform DDL operations, we recommend that you perform the operations in the destination database and then perform the operations in the source database.
Usage notes
  • Schema migration is not supported. Before you configure a data migration task, you must create databases and tables in the destination instance.
  • The storage type of the PolarDB-X instance must be ApsaraDB RDS for MySQL (private custom RDS instance). PolarDB for MySQL cannot be used as the storage type.
  • Read-only nodes of the source PolarDB for MySQL cluster cannot be migrated.
  • 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 of 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.
  • You must make sure that the precision settings for columns of the FLOAT or DOUBLE data type meet your business requirements. DTS uses the ROUND(COLUMN,PRECISION) function to retrieve values from columns of the FLOAT or DOUBLE data type. If you do not specify a precision, DTS sets the precision for the FLOAT data type to 38 digits and the precision for the DOUBLE data type to 308 digits.
  • DTS attempts to resume data migration tasks that failed within the last seven days. Before you switch workloads to the destination database, stop or release the data migration task. You can also execute the REVOKE statement to revoke the write permissions from the accounts used by DTS to access the destination database. Otherwise, the data in the source database will overwrite the data in the destination database after the task is resumed.
  • DTS executes the CREATE DATABASE IF NOT EXISTS `test` statement in the source database as scheduled to move forward the binary log file position.

Migrate data from a PolarDB for MySQL cluster to an AnalyticDB for MySQL cluster

The following table describes the usage notes and limits.
Category Description
Limits on the source database
  • The server to which the source database belongs must have sufficient outbound bandwidth. Otherwise, the data migration speed decreases.
  • The tables to migrate 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 edit tables, such as renaming tables or columns in the destination database, up to 1,000 tables can be migrated 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.
  • The binary logging feature must be enabled. The loose_polar_log_bin parameter must be set to on. Otherwise, error messages are returned during precheck and the data migration task cannot be started.
    Note

    For an incremental data migration task, binary logs of the source database must be stored for more than 24 hours. For a full data and incremental data migration task, binary logs of the source database must be stored for at least seven days. After full data migration is complete, you can set the retention period to more than 24 hours. 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. Make sure that you set the retention period of binary logs based on the preceding requirements. Otherwise, the service reliability and performance stated in the Service Level Agreement (SLA) of DTS cannot be achieved.

  • Limits on operations that are 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.
    • During data migration, do not perform DDL operations to add comments. For example, do not execute the ALTER TABLE table_name COMMENT='Table comment'; statement. Otherwise, the data migration task fails.
    • If you perform only full data migration, do not write data to the source database during data migration. Otherwise, data inconsistency between the source and destination databases occurs. To ensure data consistency, we recommend that you select schema migration, full data migration, and incremental data migration as the migration types.
Usage notes
  • Prefix indexes cannot be migrated. If the source database contains prefix indexes, data may fail to be migrated.
  • Read-only nodes of the source PolarDB for MySQL cluster cannot be migrated.
  • Due to the limits of AnalyticDB for MySQL,if the disk space usage of the nodes in an AnalyticDB for MySQL cluster reaches 80%, the task is delayed and error messages are returned. We recommend that you estimate the required disk space based on the objects to migrate. 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 of 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.
  • You must make sure that the precision settings for columns of the FLOAT or DOUBLE data type meet your business requirements. DTS uses the ROUND(COLUMN,PRECISION) function to retrieve values from columns of the FLOAT or DOUBLE data type. If you do not specify a precision, DTS sets the precision for the FLOAT data type to 38 digits and the precision for the DOUBLE data type to 308 digits.
  • DTS attempts to resume data migration tasks that failed within the last seven days. Before you switch workloads to the destination database, stop or release the data migration task. You can also execute the REVOKE statement to revoke the write permissions from the accounts used by DTS to access the destination database. Otherwise, the data in the source database will overwrite the data in the destination database after the task is resumed.
  • DTS executes the CREATE DATABASE IF NOT EXISTS `test` statement in the source database as scheduled to move forward the binary log file position.

Migrate data from a PolarDB for MySQL cluster to a self-managed Oracle database

The following table describes the usage notes and limits.
Category Description
Limits on the source database
  • The server to which the source database belongs must have sufficient outbound bandwidth. Otherwise, the data migration speed decreases.
  • The tables to migrate 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 edit tables, such as renaming tables or columns in the destination database, up to 1,000 tables can be migrated 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.
  • The binary logging feature must be enabled. The loose_polar_log_bin parameter must be set to on. Otherwise, error messages are returned during precheck and the data migration task cannot be started.
    Note

    For an incremental data migration task, binary logs of the source database must be stored for more than 24 hours. For a full data and incremental data migration task, binary logs of the source database must be stored for at least seven days. After full data migration is complete, you can set the retention period to more than 24 hours. 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. Make sure that you set the retention period of binary logs based on the preceding requirements. Otherwise, the service reliability and performance stated in the Service Level Agreement (SLA) of DTS cannot be achieved.

  • Limits on operations that are 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 perform only full data migration, do not write data to the source database during data migration. Otherwise, data inconsistency between the source and destination databases occurs. To ensure data consistency, we recommend that you select schema migration, full data migration, and incremental data migration as the migration types.
Usage notes
  • Read-only nodes of the source PolarDB for MySQL cluster cannot be migrated.
  • 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 of 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.
  • You must make sure that the precision settings for columns of the FLOAT or DOUBLE data type meet your business requirements. DTS uses the ROUND(COLUMN,PRECISION) function to retrieve values from columns of the FLOAT or DOUBLE data type. If you do not specify a precision, DTS sets the precision for the FLOAT data type to 38 digits and the precision for the DOUBLE data type to 308 digits.
  • DTS attempts to resume data migration tasks that failed within the last seven days. Before you switch workloads to the destination database, stop or release the data migration task. You can also execute the REVOKE statement to revoke the write permissions from the accounts used by DTS to access the destination database. Otherwise, the data in the source database will overwrite the data in the destination database after the task is resumed.
  • DTS executes the CREATE DATABASE IF NOT EXISTS `test` statement in the source database as scheduled to move forward the binary log file position.
Special cases If the self-managed Oracle database is deployed in a Real Application Cluster (RAC) architecture and is connected to DTS over an Alibaba Cloud virtual private cloud (VPC), you must connect the Single Client Access Name (SCAN) IP address of the Oracle RAC and the virtual IP address (VIP) of each node to the VPC and configure routes. The settings ensure that your DTS task can run as expected. For more information, see Connect an on-premises database to Alibaba Cloud and Configure a route between DTS and Express Connect, VPN Gateway, or Smart Access Gateway.
Important When you configure the source Oracle database in the DTS console, you must enter the SCAN IP address of the Oracle RAC in the Database Endpoint or IP Address field.

Migrate data from a PolarDB for MySQL cluster to a DataHub instance

The following table describes the usage notes and limits.
Category Description
Limits on the source database
  • The tables to migrate 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 edit tables, such as renaming tables or columns in the destination database, up to 1,000 tables can be migrated 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.
  • The binary logging feature must be enabled. The loose_polar_log_bin parameter must be set to on. Otherwise, error messages are returned during precheck and the data migration task cannot be started.
    Note

    For an incremental data migration task, binary logs of the source database must be stored for more than 24 hours. For a full data and incremental data migration task, binary logs of the source database must be stored for at least seven days. After full data migration is complete, you can set the retention period to more than 24 hours. 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. Make sure that you set the retention period of binary logs based on the preceding requirements. Otherwise, the service reliability and performance stated in the Service Level Agreement (SLA) of DTS cannot be achieved.

  • Limits on operations: During schema migration, do not perform DDL operations to change the schemas of databases or tables. Otherwise, the data migration task fails.
Other limits
  • Initial full data migration is not supported. DTS does not migrate the historical data of required objects from the source PolarDB for MySQL cluster to the destination DataHub instance.
  • Only tables can be selected as the objects to be migrated.
  • Read-only nodes of the source PolarDB for MySQL cluster cannot be migrated.
  • You must make sure that the precision settings for columns of the FLOAT or DOUBLE data type meet your business requirements. DTS uses the ROUND(COLUMN,PRECISION) function to retrieve values from columns of the FLOAT or DOUBLE data type. If you do not specify a precision, DTS sets the precision for the FLOAT data type to 38 digits and the precision for the DOUBLE data type to 308 digits.
  • DTS attempts to resume data migration tasks that failed within the last seven days. Before you switch workloads to the destination database, stop or release the data migration task. You can also execute the REVOKE statement to revoke the write permissions from the accounts used by DTS to access the destination database. Otherwise, the data in the source database will overwrite the data in the destination database after the task is resumed.
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.