OceanBase Cloud supports compatibility assessment, data migration, and performance assessment to achieve high-performance, secure, and reliable data migration.
Background information
You can migrate a database system to OceanBase Cloud. Before migrating data, you can use the compatibility assessment feature to systematically analyze your database objects and SQL statements, and provide an automated conversion solution. This helps you specify the corresponding migration strategy and complete online database migration through the data migration feature. After migrating data, you can conduct a thorough performance assessment before business switchover by replaying business traffic to identify performance risks after migration. The performance assessment report provides optimization solutions to reduce migration risks.
This topic uses an example of migrating data from an Alibaba Cloud RDS MySQL instance to an Alibaba Cloud OceanBase Database instance in MySQL compatible mode. It introduces the complete process from compatibility assessment to data migration to performance assessment, providing a one-stop experience for data assessment and migration.
The procedure for migrating data through the OceanBase Cloud console is as follows:
Perform a compatibility assessment. For more information, see Compatibility Assessment.
Create and run a data migration task to migrate data from the source to the destination. For more information, see Data Migration.
Perform a performance assessment. For more information, see Performance Assessment.
Prerequisites
You have created data sources for the source and destination. For more information, see Create a data source.
You have created database users for the source and destination to perform compatibility assessment, data migration, and performance assessment, and granted the necessary permissions to these users. For more information, see User privileges.
Perform a compatibility assessment
Create an online assessment task.
Log in to the OceanBase Cloud console.
In the left-side navigation pane, choose Data Services > Migrations.
On the Migrations page, click the Assess Compatibility tab.
On the Assess Compatibility tab, click Create > Online Assessment.
On the Basic Information page, configure the parameters.
Specify the Task Name. The name cannot exceed 30 characters.
In the Source section, click Quick Fill in the upper-right corner. In the drop-down list, select the created RDS for MySQL data source.
In the Target section, select Target Database Version.
Note
You need to select only the assessment version of the target database. You can create a real target data source before you migrate data.
In the Assessment Type section, select the assessment type. At present, Object Assessment and Profile Assessment are supported.
Click Next.
On the Advanced Configurations page, set the assessment scope.
Click Start Assessment to start the online assessment task.
On the Tasks page, click View Report next to the completed assessment task.
You can view the compatibility of various types of objects and all incompatibilities and their corresponding modification methods on the tabs of different assessment types in the migration assessment report. For objects that are fully compatible, you can directly migrate data. For objects that are incompatible, you can view the corresponding suggestions and handle them, and then develop an appropriate migration strategy before you migrate data to reduce migration costs.
Start data migration
Create a data migration task.
Log in to the OceanBase Cloud console.
In the left-side navigation pane, choose Data Services > Migrations.
On the Data Migration page, click the Create Task tab.
On the Data Migration tab, click Quick Fill in the upper-right corner.
On the Configure Source & Target page, configure the parameters.
Specify the task name in the Task Name field in accordance with the naming conventions.
In the Source section, click Quick Fill in the upper-right corner, and select the created MySQL RDS data source from the drop-down list.
In the Target section, click Quick Fill in the upper-right corner, and select the created OceanBase MySQL compatible data source from the drop-down list.
Click Test and Continue.
On the Select Type & Objects page, configure the parameters.
In the Sync Topology section, select One-way Sync.
In the Migration Type section, select the migration type for the current data migration task, including Schema Migration, Full Migration, Incremental Synchronization, and Full Verification.
In the Select Migration Objects section, configure the method for selecting the migration object. This example selects Specify Objects.
In the left list of the Select Migration Scope section, select the objects to be migrated and click > to add them to the right list.
Click Next. On the Migration Options page, configure the parameters.
After the parameters are configured, click Pre-check.
After the pre-check succeeds, click Purchase to go to the Purchase a data migration instance page. For more information, see Purchase a data migration instance.
After the purchase succeeds, go back to the Migrations page to view the progress of the data migration task.
After the data migration task is completed, you can create a performance assessment task before business switchover to replay the business load and identify performance risks after migration in advance, and then optimize the performance.
Perform a performance assessment
Obtain the traffic file of an Alibaba Cloud RDS MySQL instance. For more information, see Obtain MySQL instance audit logs.
Create a full performance assessment task.
Log in to the OceanBase Cloud console.
In the left-side navigation pane, choose Data Services > Data Migration.
On the Data Migration page, click the Assess Performance tab.
On the Assess Performance tab, click Create > Full Assessment.
On the Set Up Source Database page, configure the parameters.
Parameter Description Assessment Task Name The name of the assessment task, which must be less than 30 characters in length. Instance Source Select ALIYUN. Source Database Type Select RDS_MYSQL. Region The region where the database instance is located. Source Database Instance The ID of the RDS MySQL instance obtained from the Alibaba Cloud console. Click Next. On the Configure Data Collection page, upload the RDS MySQL instance traffic file obtained in Step 1.
Click Next. On the Set Up Target Database page, configure the parameters.
Parameter Description Region The region of the target instance. The target region must be the same as the source region. Target Database Instance The ID of the OceanBase Database instance in MySQL compatible mode. Tenant The ID of the tenant to which the target database instance belongs. Target High-Privilege Account The username of the database user created for data assessment. Password The password of the database user. After the preceding parameters are configured, click Verify. After the verification is passed, select the name of the database to be replayed in the Target list section and click > to add it to the Database List of Target End section.
Click Next. After you confirm that the name of the target database and that of the database in the traffic file are the same, click OK in the dialog box that appears.
On the Configure Workload Replay page, configure the parameters.
Click Next to perform a precheck. If the precheck is passed, click Start Now to start the performance assessment task.
On the Assess Performance page, view the progress of the performance assessment task. After the assessment task is completed, click View Report to view the replay analysis and SQL diagnostics information.
You can quickly locate the time consumption comparison between the source and target databases, the number of successful and failed SQL statements, and optimize the SQL statements with high execution time based on the replay report, thereby improving the stability after data migration.