This topic describes how to use OceanBase Migration Service (OMS) to migrate data from a Doris database to the MySQL-compatible mode of OceanBase Database.
Background information
Apache Doris is a real-time analytical database based on the MPP architecture, capable of providing high-performance data query and analysis capabilities. OMS supports migrating data from a Doris database to the MySQL-compatible mode of OceanBase Database starting from V4.4.1. The current link supports Schema Migration and Full Migration.
Limitations
Apache Doris V2.1.x is supported.
The current link only supports Schema Migration and Full Migration. It does not support Incremental Synchronization or Reverse Increment, so the corresponding options are not provided in Migration Type.
Schema migration supports object types Tables and Views. OMS migrates the table structure from Doris to the MySQL-compatible mode of OceanBase Database.
Full migration supports migrating the existing data from Doris to the MySQL-compatible mode of OceanBase Database.
The current link does not support incremental synchronization. Updates and deletions that occur to the source tables after they are read during full migration will not be caught up. If this migration is for business switchover and consistency between the target and source is required, arrange a write freeze window or use a stable dataset. After completing full migration and data verification, and processing verification differences, perform the switchover. Data verification can only identify differences; it cannot fill them. For the verification entry, see the procedure below.
Prerequisites
A corresponding Database has been created in the MySQL-compatible mode of the target OceanBase Database.
A dedicated database user for the data migration task has been created for both the source Doris database and the target OceanBase Database MySQL-compatible mode, and the relevant permissions have been granted. For details, see Create a database user.
A Doris data source and an OceanBase Database MySQL-compatible mode data source have been created in OMS. For parameter descriptions on creating a Doris data source, see Create a Doris data source.
Procedure
Create a data migration task.
Log in to the OMS console.
In the left-side navigation pane, click Data Migration.
On the Data Migration page, click Create Task in the upper-right corner.
On the Create Task page, customize the name of the migration task.
We recommend that you use a combination of Chinese characters, numbers, and letters. The name must not contain spaces and cannot exceed 64 characters in length.
Note
The task name is a unique identifier within the OMS system. Please choose a suitable name for your task.
In the Select Source and Target step, configure the parameters.
ParameterDescriptionSource If you have created a Doris data source, select it from the drop-down list. If not, click New Data Source in the drop-down list to create one in the dialog box on the right. Target If you have created a physical data source in the MySQL-compatible mode of OceanBase Database, select it from the drop-down list. If not, click New Data Source in the drop-down list to create one in the dialog box on the right. For more information, see Create a physical data source in OceanBase Database. Tag Click the text box and select a target tag from the drop-down list. You can also click Manage Tags to create, modify, or delete tags. For more information, see Manage data migration tasks by using tags. Click Next. In the Select Migration Type step, select the migration type for the current data migration task.
The Migration Type only includes Schema Migration and Full Migration. This step does not provide options for Incremental Synchronization or Reverse Increment.
Migration TypeLimitationsSchema Migration After a schema migration task starts, OMS migrates the definitions of Tables and Views from the Doris database to the MySQL-compatible mode of OceanBase Database, automatically filtering temporary tables. Full Migration After a full migration task starts, OMS migrates the existing data from the tables in the Doris database to the corresponding tables in the target database. Click Next. In the Select Migration Objects step, select the objects to migrate for the current data migration task.
You can select migration objects through the Specify Objects or Match by Rule entry. For details on configuring matching rules, see Configure matching rules for migration or synchronization objects.
In the Select Migration Objects step, select Specify Objects.
In the Source Object(s) list, select the objects to migrate.
Click > to add them to the Target Objects list.
Note
You can configure row filter conditions in the Settings section of a table object. Full migration reads only rows that meet the conditions. The current step does not support Incremental Synchronization, so migration objects do not provide incremental-related options such as the DDL synchronization scope.
Click Next. In the Migration Options step, configure the parameters.
Schema migration
The parameters in this section are displayed only if you have selected Schema Migration in the Select Migration Type step.
ParameterDescriptionAutomatically proceed to the next stage upon completion Specifies whether to automatically proceed to the next stage after schema migration is completed. Valid values: Yes (default) and No. Normal index migration method Specifies how non-unique key indexes associated with table objects are migrated after the table objects are migrated. Valid values: Do Not Migrate, Migrate with Schema, and Post-Full-Migration (default). Full migration
The parameters in this section are displayed only if you have selected Full Migration in the Select Migration Type step.
ParameterDescriptionFull Migration Rate Limit You can decide whether to enable the full migration rate limit based on your actual needs. If enabled, set the RPS (the maximum number of data rows that can be migrated to the target per second during the full migration phase) and BPS (the maximum amount of data that can be migrated to the target per second during the full migration phase). Note
The RPS and BPS set here are only for rate limiting. The actual achievable performance during full migration is subject to factors such as the source, target, and instance specifications.
Full Migration Resource Configuration You can select Small, Medium (default), or Large to use their default read concurrency, write concurrency, and memory. You can also select Custom and configure the read concurrency, write concurrency, and memory (in GB). Notice
For custom configuration, the minimum value is 1, and only integers are supported.
Handling Strategy When Target Table Has Records The handling strategies include Ignore and Stop Migration (default): - If Ignore is selected, when the target table has data and the original data conflicts with the data to be written, OMS logs the conflicting data and retains the original data unchanged.
- If Stop Migration is selected, when the target table has data, an error is reported during full migration indicating that migration is not allowed. You must handle the data in the target table before continuing the migration.
If the configuration parameters on the page do not meet your requirements, you can click Parameter Configuration at the bottom of the page for more specific configuration. If you have configured task templates or component templates, you can also reference them here.
Click Precheck to have the system perform a precheck on the data migration task.
During the Precheck step, OMS checks whether the database's network connection meets the requirements. The data migration task can only be started after all checks pass. If the precheck reports an error:
You can troubleshoot and resolve the issue, then re-execute the precheck until it succeeds.
You can also click Skip in the Actions column for the failed precheck item. A dialog box appears, explaining the specific impact of skipping this operation. After confirming you can skip it, click OK in the dialog box.
After the precheck passes, click Start Task. If you do not need to start the task immediately, click Save to go to the data migration task details page, where you can start it manually if needed.
You can click Configure Validation Task in the upper-right corner of the data migration task details page to create a data verification task, which compares data differences between the source Doris database and the target OceanBase Database MySQL-compatible mode. For details, see Create a data verification task.
Note
Actual testing shows that the independent entry for Create Verification Task in the Data Verification module does not currently support the Doris source type (the source type list includes OceanBase MySQL Mode, OceanBase Oracle Mode, MySQL, Oracle, TiDB, PostgreSQL, DB2_LUW, Milvus, ElasticSearch, and SQLServer). To verify data on a Doris link, create the task through the Configure Verification Task entry in the upper-right corner of the data migration task details page. The source and target will be automatically populated. The verification types supported are Full Verification and Row Count Verification.