Skip to content
Docs
Data Migration
Data Transfer

Data Transfer

Operation Guide

1. Plugin Installation

Open Chat2DB, click the plugin icon on the left toolbar, click the Install/Update plugin button on the right, and click Install.

'plugins'

2. Open the plugin

Click Launch to open the plugin, and wait for the plugin to load.

'launch'

3. Create a task

'create'

  1. Enter the name of the task in the Name field. For example, task-01qu6D.
  2. Select the size of the virtual machine as needed. The options include: Tiny, Small, Medium, Large. Tiny is selected by default.
  • Description of each specification:
  • Tiny: The smallest specification, using 2 cores, 4G memory, and 1 thread for migration.
  • Small, Medium, and Large specifications increase resources based on demand.
  1. Source database engine
  • Select the source database engine type. In this example, MySQL is selected.
  • Supported versions include: 5.6, 5.7, and 8.0.
  • Supported database types include: self-built databases, ECS self-built databases, and cloud databases.
  1. Target database engine
  • Select the target database engine type. In this example, MySQL is selected.
  • Supported versions include: 5.6, 5.7, and 8.0.
  • Supported database types include: self-built databases, ECS self-built databases, and cloud databases.

'create'

After filling in all the necessary information, click the Create button in the lower right corner of the page to create a new task.

'create'

4. Select the source and target databases

  1. Database type:
  • Select your original database type in the Source information section. In this example, we selected "MySQL".
  • Similarly, select the target database type you want to migrate your data to in the Target information section. Again, "MySQL" is selected here.
  1. Database IP:Port:
  • Enter the IP address and port number of your original database in the Source information section.
  • For the Target information section, you need to provide the IP address and port number of the target database.
  1. Account and password:
  • The Source information section requires you to provide the username and password to access the original database. The default username is root.
  • The Target information section requires you to provide the username and password to access the target database.
  • If you don't know the username, you can click the Auth script operation below to get the authorized user.
  1. SSL Transport:
  • If your database is configured with SSL encrypted connection, you can choose to enable SSL transport. Otherwise, please keep it disabled.
  1. Test Connection:
  • After entering all the necessary information, you can click Test connection to verify that the information you provided is correct and can successfully connect to your database.

'test_connection'

5. Migration Options

  1. Objects:
  • This area will list a series of database names. You can decide which database tables, views, functions, stored procedures, triggers, etc. should be included in the migration process by checking these items.

'Migration'

  1. Migration:

Speed: This provides a choice of migration speed, the default is Unlimited, which means unlimited speed. If you need to limit the migration speed, you can change it here.

  • Migrate type: Three options are provided - Objects, Data, and Sync incremental. Depending on the requirement, you can choose to migrate object definitions, data, or incremental synchronization.
  • Objects: Indicates migrating objects in the database, such as tables, views, etc.
  • Data: Indicates migrating data in the database.
  • Sync incremental: Indicates incremental synchronization, migrating only the content that has changed since the last migration.

Sync policy: This section allows you to specify the synchronization strategy.

  • Sync topology: You can choose unidirectional or bidirectional synchronization.
  • unidirectional: Unidirectional synchronization, data will only be transferred from the source database flow to the target database.
  • Bidirectional: Bidirectional synchronization, data can flow between the two databases.
  • Conflict policy: How to deal with conflicts when they occur.
  • Cover and continue: Overwrite existing data and continue migration.
  • Ignore and continue: Ignore conflicts and continue migration.
  • Report an error and stop: Report an error and stop migration.
  • Filter DDL: Whether to filter out data definition language (DDL) statements. DDL is usually used to create, modify or delete database structures.
  1. Upload migrate object configuration file / Download template file:
  • If you have prepared the configuration file for the migration object, you can upload it by clicking "Upload migrate object configuration file".
  • If you need to download the template file for manual editing, you can click "Download template file".

'Migration'

  1. Advanced configuration:
  • Click this link to enter a more detailed configuration page for advanced customization of the migration task.

'Migration' 'Migration'

  1. Confirm information:
  • After filling in all the necessary information, you can click Next to proceed to the next step.

Before performing database migration, make sure you have carefully checked all options, especially the conflict policy and synchronization strategy, as they may directly affect the results of the migration.

6. Mapping and filtering

'mapping'

  • Field mapping refers to mapping fields in one table to fields in another table in order to exchange or synchronize data between the two tables. During the configuration of the MySQL database migration task, users can set the object mapping name of the library, table, and field in the target library. As shown in the figure below, [text displayed in dark green with the -sy suffix] is the mapping name of the modified target schema, table, and field.

Note: The modified mapping name should start with an English letter, and only English letters (case-sensitive), numbers, and underscores are allowed. The length is less than or equal to 64

'mapping'

'mapping'

After the migration is completed, we enter the target library to view, and we can see that the library, table, and field are all displayed as the mapping name we set during the migration process.

'mapping'

  • In data migration or data replication, where can be used to filter out the data that needs to be migrated or replicated, avoid unnecessary data transmission and processing, and improve the efficiency of migration or replication. As shown in the figure below, during the configuration of the MySQL database migration task, click Mapping and Filtering to support free configuration of data filtering conditions. After entering the filtering conditions in the text box, move out of the text box, and you can view the filtering effect in the filtering result preview so that users can confirm whether it meets expectations.

'mapping'

After setting the filtering conditions for the table, the filtering conditions will be automatically included during the full and incremental synchronization process. Ensure that the filtered data is synchronized to the target end. Here we set the where filtering condition: CategoryId > 9, and the filtering results are as follows.

  • Source data display:

'mapping'

  • Target data display:

'mapping'

The target database only synchronizes data with CategoryId > 9, which meets the target expectations.

7. Final confirmation

  • Objects with the same name in the target database will be rebuilt, so please check the target database carefully before migration to avoid overwriting and corrupting data. It is recommended to perform data migration during off-peak hours to reduce the impact of data updates and DDL changes.

  • During the confirmation stage, users need to review the prompt information and understand potential problems and risks, such as inconsistent database versions that may cause migration failure. At the same time, they can also review the pre-check results. If there are errors or warnings, they should resolve these issues before performing the migration. If everything is OK, users can click Save task and execute to save and execute the migration task or click Save task to temporarily save the relevant configuration information.

'confirm'

8. Migration results

  • When the migration is completed, users can view the migration results, including the progress, status, error information, etc.

'result'

'result'