Before You Start

There are some constraints imposed on DRS to improve the stability and security of data migration. Before migrating data, ensure that all storage engines meet the requirements.

Table 1 Tips

Type

Operation Constraints

Usage tips

During a full migration, stop writing data to the source and destination databases.

If you perform a full plus incremental migration task, you can still write service data to the source database. It is recommended that you start the migration task 2 to 3 days in advance and comply with the following constraints (in Table 1) and operation requirements (in Table 2 and Table 3) to ensure a successful migration.

  • Due to the following reasons, you are advised to start a migration task during off-peak hours. If you have to migrate data during peak hours, enable Flow Control to adjust the migration speed.
    • Full migration poses certain workload on the source database.
    • To ensure data consistency, tables to be migrated without a primary key may be locked for 3s.
    • The data being migrated may be locked by other transactions for a long period of time, resulting in read timeout.
    • Due to the inherent characteristics of MySQL, in certain scenarios the read and write performance may be negatively affected. For example, if the CPU resources are insufficient and the storage engine is Tokudb, the read speed on tables may be decreased by 10%.
  • Due to slight time difference and continuous operations on data, inconsistent comparison results may be generated, reducing the reliability and validity of the results. To obtain accurate comparison results, you are advised to start data comparison at a specified time point during off-peak hours. If it is needed, select Start at a specified time for Comparison Time.

MySQL

DRS has the following constraints on common operations in the case of migration failures caused by unpredictable errors or sudden environment changes:

Table 2 Operation constraints

Type

Operation Constraints

Notes

  • Objects that have dependencies must be migrated at the same time to avoid migration failure. Common dependencies: tables referenced by views, views and tables referenced by stored procedures/functions/triggers, and tables referenced by primary and foreign keys
  • Data cannot be migrated from a newer version database to an older version database.
  • The primary/standby switchover of the source DB instance is not supported.
  • Events and triggers cannot be migrated. You need to manually export the events and triggers and import them to the destination database.
  • Resumable upload is supported, but data may be repeatedly inserted into a table that does not have a primary key.
  • If no table is selected, objects such as views and stored procedures cannot be migrated separately. Currently, DRS cannot identify table dependencies. For example, tables that have a primary key-foreign key relationship cannot be migrated separately.
  • If DCC does not support 4 vCPUs | 8 GB or larger instance specifications, the migration task cannot be created.
  • During full migration, DDL operations such as table structure modification are not supported.
  • The destination DB instance must be readable and writable. Otherwise, the migration may fail.

Precautions

  • During migration, do not modify or delete the usernames, passwords, permissions, or ports of the source and destination databases.
  • Data inconsistency may occur when the MyISAM table is modified during a full migration.
  • During the migration, you are not advised to perform a primary/standby switchover on the destination database.
  • Do not disconnect the source database from the public network before the migration task is complete.
  • During migration, do not write the statement-based binlog into the source database.
  • During migration, do not clear the binlog in the source database.

DDS

DRS has the following constraints on common operations in the case of migration failures caused by unpredictable errors or sudden environment changes:

Table 3 Operation constraints

Type

Operation Constraints

Notes

  • Data cannot be migrated from a newer version database to an older version database.
  • System databases cannot be migrated. The username and role must be manually created in the destination database.
  • The account of the destination database used for migration must have the write permission. If the destination database is on a cluster instance, the migration account must have the read permission on the config data.
  • If a Time-to-Live (TTL) index already exists in the collection of the source database or is created during an incremental migration, data consistency cannot be ensured when source and destination databases are in different time zone.
  • Collections that contain the _id field without indexes are not supported.
  • If the destination database is on a replica set instance out of the cloud, you are advised to enter information about all primary and secondary nodes to reduce the impact of a primary/secondary switchover on the migration task. If you enter information about primary and secondary nodes, ensure that all nodes belongs to the same replica set instance.
  • If the destination database is on a cluster instance out of the cloud, you are advised to enter information about multiple mongos nodes to reduce the impact of the single-node failure on the migration task. In addition, multiple mongos nodes support load balancing. In addition, ensure that all mongos nodes belong to the same cluster instance.
  • To accelerate the migration, you are advised to delete unnecessary indexes from the source database and retain only necessary indexes before the migration.

Precautions

  • During migration, do not modify or delete the usernames, passwords, permissions, or ports of the source and destination databases.
  • To ensure data consistency, you are not allowed to modify the destination database (including but not limited to DDL and DML operations) during the entire migration process.
  • During migration, data rollback caused by a primary/standby switchover of the source database is not supported.