Migration ideas

We believe that in YMatrix, data migration mainly consists of three phases: The first phase, environmental preparation; The second stage is migration execution; The third phase, follow-up tasks.

1 Environmental preparation

If you need all library migration, then you need to make sufficient preparations, usually including but not limited to the following steps (appropriately adjust according to the specific scenario):

  • Before stopping the business: back up old data, prepare the software environment of the target cluster, stop all DDL operations on the business side, back up the DDL statements required for migration, correct and optimize the DDL statements (recommended source information to create statements without indexes to improve migration efficiency) to adapt to the target database, etc.;
  • After stopping the business: collect the software and hardware configuration information of the target cluster, compare and analyze the characteristics of the source cluster and the target cluster architecture to establish a suitable migration plan.
    We believe that these steps are necessary, and you need to ensure the security of old data and find the best way to migrate to reduce the cost and risk of stopping your business.

If you need single table migration, then use mxgate to export the table data to be migrated to a file backup.

2 Migration execution

After the preparation work is complete, enter the stage of performing the migration operation, at which stage:

If you need Full library migration, we recommend not migrating the mirror node (Mirror), but adding Mirror after executing using Full library migration tool - mxshift, which will greatly improve the migration efficiency. The mxshift tool will automatically print the migration progress according to the point in time when each table is migrated, and check the correctness of the migration in real time.

If you need a single table migration, then use the Single Table Migration Tool - mxgate to migrate.

3 Follow-up tasks

After the migration is completed, if you execute the Full library migration, we recommend that you recreate the index and execute the analyzedb command in the entire library to update the statistical information of the new library, finally restore business access, observe business operation, and keep track of the data for a period of time (the specific time depends on the specific timing scenario), and finally complete data migration.

For examples of full library migration, please see: Migrate data from Greenplum 6 to YMatrix 5 Migrate data from YMatrix 4 to YMatrix 5

For examples of single table migration, please see: Single table migration