OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase AI DatabaseOceanBase Cloud OceanSeekOceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog ServiceOceanBase DataPilotOceanBase OAgent

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase AI DatabaseOceanBase Cloud OceanSeekOceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog ServiceOceanBase DataPilotOceanBase OAgent
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Migration Service

V4.4.0Enterprise Edition
  • OMS Documentation
  • OMS Introduction
    • Overview of OMS
    • Terms
    • OMS HA
    • Principles of Store
    • Principles of Full-Import and Incr-Sync
    • Data verification principles
    • Architecture
      • Overview
      • Hierarchical functional system
      • Basic components
    • OMS Oracle full migration design and impact
    • Limitations
  • Quick Start
    • Data migration process
    • Data synchronization process
  • Deploy OMS
    • Deployment types
    • System and network requirements
    • Memory and disk requirements
    • Environment preparations
    • Deploy OMS on a single node
    • Deploy OMS on multiple nodes in a single region
    • Deploy OMS on multiple nodes in multiple regions
    • Scale out
    • Scale down deployment
    • Check the deployment
    • Deploy a time-series database (Optional)
  • OMS console
    • Log in to the OMS console
    • Overview
    • User center
      • Configure user information
      • Change your login password
      • Log out
  • Data migration
    • Data Migration Overview
    • Migrate data from a MySQL database to the MySQL-compatible mode of OceanBase Database
    • Migrate data from an OceanBase database in MySQL-compatible mode to a MySQL database
    • Migrate data from an Oracle database to the MySQL compatible mode of OceanBase Database
    • Migrate data from an OceanBase database in Oracle compatible mode to an Oracle database
    • Migrate data from an Oracle database to OceanBase Database in Oracle compatible mode
    • Migrate data from a DB2 LUW database to an Oracle-compatible tenant of OceanBase Database
    • Migrate data from an Oracle-compatible tenant of OceanBase Database to a DB2 LUW database
    • Migrate data from a DB2 LUW database to a MySQL-compatible tenant of OceanBase Database
    • Migrate data from a MySQL-compatible tenant of OceanBase Database to a DB2 LUW database
    • Migrate data between OceanBase databases of the same tenant type
    • Configure a bidirectional synchronization task
    • Migrate data from a TiDB database to a MySQL-compatible tenant of OceanBase Database
    • Migrate data from a PostgreSQL database to the Oracle compatible mode of OceanBase Database
    • Migrate data from a PostgreSQL database to the MySQL compatible mode of OceanBase Database
    • Migrate data from a PolarDB-X 1.0 database to a MySQL-compatible tenant of OceanBase Database
    • Migrate data from a Milvus database to a MySQL-compatible tenant of OceanBase Database
    • Migrate data from an OBSharding database to a MySQL-compatible tenant of OceanBase Database
    • Migrate incremental data from an Oracle-compatible tenant of OceanBase Database to a MySQL database
    • Migrate data from a Doris database to the MySQL-compatible mode of OceanBase Database
    • Migrate data from a DM database to an OceanBase database in MySQL-compatible mode
    • Migrate data from DM Database to OceanBase Database in Oracle compatible mode
    • Migrate data from Elasticsearch to OceanBase Database in MySQL-compatible mode
    • Migrate data from a SQL Server database to OceanBase Database in MySQL-compatible mode
    • Migrate data from an SQL Server database to OceanBase Database in Oracle compatible mode
    • Manage data migration tasks
      • View details of a data migration task
      • Rename a data migration task
      • View and modify migration objects
      • Use tags to Manage data migration tasks
      • Perform batch operations on data migration tasks
      • Download and import settings of migration objects
      • View and modify migration parameters
      • Download a conflict log file
      • Start and pause a data migration task
      • End and delete a data migration task
    • Supported DDL operations and limits for synchronization
      • Synchronize DDL operations from a MySQL database to a MySQL-compatible tenant of OceanBase Database
        • Overview of DDL synchronization from MySQL to OceanBase Database's MySQL compatible mode
        • CREATE TABLE
          • Create a table
          • Create a column
          • Create indexes or constraints
          • Create partitions
        • Data type conversion
        • ALTER TABLE
          • Modify tables
          • Operations on columns
          • Operations on constraints and indexes
          • Partition operations
        • TRUNCATE TABLE
        • RENAME TABLE
        • DROP TABLE
        • CREATE INDEX
        • DROP INDEX
        • DDL incompatibilities between a MySQL database and a MySQL-compatible tenant of OceanBase Database
          • Overview
          • Incompatibilities of the CREATE TABLE statement
            • Incompatibilities of CREATE TABLE
            • Column types that are supported to create indexes or constraints
          • Incompatibilities of the ALTER TABLE statement
            • Incompatibilities of ALTER TABLE
            • Change the type of a constrained column
            • Change the type of an unconstrained column
            • Change the length of a constrained column
            • Change the length of an unconstrained column
            • Delete a constrained column
          • Incompatibilities of DROP INDEX operations
      • Synchronize DDL operations from the MySQL compatible mode of OceanBase Database to a MySQL database
      • DDL operations for synchronizing data from an Oracle database to an Oracle-compatible tenant of OceanBase Database
        • Overview of DDL synchronization from Oracle to OceanBase Database Oracle compatible mode
        • CREATE TABLE
          • Overview for CREATE TABLE
          • Create a relational table
            • Create a relational table
            • Define columns of a relational table
          • Virtual columns
          • Regular columns
          • Create partitions
            • Overview for creating partitions
            • Partitioning
            • Subpartitioning
            • Composite partitioning
            • Custom partitioning
            • Subpartition templates
          • Constraints
            • Overview
            • Inline constraints
            • Out-of-line constraints
        • CREATE INDEX
          • Overview
          • Regular table indexes
        • ALTER TABLE
          • Overview
          • Modify, drop, and add table attributes
          • Column attribute management
            • Modify, drop, and add column attributes
            • Rename a column
            • Add columns and column attributes
            • Modify column attributes
            • Drop columns
          • Modify, drop, and add constraints
          • Partition management
            • Modify, drop, and add partitions
            • Drop a partition
            • Drop a subpartition
            • Add partitions and subpartitions
            • Modify partitions
            • Drop partition data
        • DROP TABLE
        • RENAME OBJECT
        • TRUNCATE TABLE
        • DROP INDEX
        • DDL incompatibilities between an Oracle database and an Oracle-compatible tenant of OceanBase Database
          • Overview
          • Incompatibilities of CREATE TABLE
          • Incompatibilities in table modification operations
            • Incompatibilities of ALTER TABLE
            • Change the type of a constrained column
            • Change the type of an unconstrained column
            • Change the length of a constrained column
            • Change the length of an unconstrained column
      • Synchronize DDL operations from the Oracle compatible mode of OceanBase Database to an Oracle database
      • Synchronize DDL operations from a DB2 LUW database to an Oracle-compatible tenant of OceanBase Database
      • Synchronize DDL operations from the Oracle compatible mode of OceanBase Database to a DB2 LUW database
      • Synchronize DDL operations from a DB2 LUW database to a MySQL-compatible tenant of OceanBase Database
      • Synchronize DDL operations from the MySQL compatible mode of OceanBase Database to a DB2 LUW database
      • Synchronize DDL operations between MySQL-compatible tenants of OceanBase Database
      • Synchronize DDL operations between Oracle-compatible tenants of OceanBase Database
      • Synchronize DDL operations from a PostgreSQL database to the MySQL compatible mode of OceanBase Database
      • Synchronize DDL operations from a PostgreSQL database to the Oracle compatible mode of OceanBase Database
      • Synchronize DDL operations from an OBSharding database to the Oracle compatible mode of OceanBase Database
      • Synchronize DDL operations from an SQL Server database to an OceanBase database
  • Data synchronization
    • Data synchronization overview
    • Synchronize data from OceanBase Database to a Kafka instance
    • Synchronize data from OceanBase Database to a RocketMQ instance
    • Synchronize data from OceanBase Database to a DataHub instance
    • Synchronize data from OceanBase Database to Swift
    • Synchronize data from an ODP logical table to a physical table in a MySQL-compatible tenant of OceanBase Database
    • Synchronize data from an ODP logical table to a DataHub instance
    • Synchronize data from an IDB logical table to a MySQL-compatible tenant of OceanBase Database
    • Synchronize data from an IDB logical table to a DataHub instance
    • Synchronize data from a MySQL database to a DataHub instance
    • Synchronize data from an Oracle database to a DataHub instance
    • Synchronize data from an OBSharding database to Kafka
    • Manage data synchronization tasks
      • View details of a data synchronization task
      • Change the name of a data synchronization task
      • View and modify synchronization objects
      • Use tags to Manage data synchronization tasks
      • Perform batch operations on data synchronization tasks
      • Download and import the settings of synchronization objects
      • View and modify the parameter configurations of a data synchronization task
      • Start and pause a data synchronization task
      • End and delete a data synchronization task
  • Data validation
    • Data verification overview
    • Create a data validation task
    • Manage data validation tasks
      • View details of a data validation task
      • Change the name of a data validation task
      • View and modify validation objects
      • View and modify verification parameters
      • Manage data validation tasks by using tags
      • Import validation objects
      • Start, stop, and resume a data validation task
      • Clone a data validation task
      • Delete a data validation task
  • Create and manage data sources
    • Create data sources
      • Create an OceanBase data source
        • Create a physical OceanBase data source
        • Create an ODP data source
        • Create an IDB data source
        • Create a public cloud OceanBase data source
        • Create a standalone OceanBase data source
      • Create a MySQL data source
      • Create an Oracle data source
      • Create a TiDB data source
      • Create a Milvus data source
      • Create a Kafka data source
      • Create a RocketMQ data source
      • Create a DataHub data source
      • Create a Swift data source
      • Create a DB2 LUW data source
      • Create a PostgreSQL data source
      • Create an SQL Server data source
      • Create a PolarDB-X 1.0 data source
      • Create an OBSharding data source
      • Create a DM data source
      • Create a Doris data source
      • Create an Elasticsearch data source
    • Manage data sources
      • View data source information
      • Copy a data source
      • Edit a data source
      • Delete a data source
    • Create a database user
    • User privileges
    • Enable binlogs for the MySQL database
    • Minimum privileges required when an Oracle database serves as the source
  • OPS & Monitoring
    • O&M overview
    • Go to the overview page
    • Server
      • View server information
      • Add a server
      • Delete a server
      • Update the quota
      • View server logs
      • Manage resource groups
    • Components
      • Store
        • Add a Store component
        • View details of a Store component
        • Update the configurations of a Store component
        • Start and pause a Store component
        • Delete a Store component
      • Incr-Sync
        • View details of an Incr-Sync component
        • Start and pause an Incr-Sync component
        • Migrate an Incr-Sync component
        • Update the configurations of an Incr-Sync component
        • Batch O&M
        • Delete an Incr-Sync component
      • Full-Import
        • View details of a Full-Import component
        • Pause a Full-Import component
        • Rerun and resume a Full-Import component
        • Update the configurations of a Full-Import component
        • Delete a Full-Import component
      • Full-Verification
        • View details of a Full-Verification component
        • Pause a Full-Verification component
        • Rerun and resume a Full-Verification component
        • Update the configurations of a Full-Verification component
      • Incr-Verification
        • View details of the Incr-Verification component
        • Pause an Incr-Verification component
        • Rerun and resume an Incr-Verification component
        • Update an Incr-Verification component
      • Row-Verification
        • View details of a Row-Verification component
    • O&M Task
      • View O&M tasks
      • Skip a task or subtask
      • Retry a task or subtask
    • Parameter Template
      • Overview
      • Task Template
        • Create a task template
        • View and edit task templates
        • Copy and export a task template
        • Delete a task template
      • Component Template
        • Create a component template
        • View and edit component templates
        • Copy and export a component template
        • Delete a component template
      • Component parameters
        • Store component parameters
        • Incr-Sync component parameters
        • Full-Import component parameters
        • Full-Verification component parameters
        • Incr-Verification component parameters
        • Parameters of the Row-Verification component
        • CM component parameters
        • Supervisor component parameters
  • System management
    • Permission Management
      • Overview
      • Manage users
      • Manage departments
    • Alert center
      • View task alerts
      • View system alerts
      • Manage alert settings
    • Associate with OCP
    • System parameters
      • Modify system parameters
      • Modify HA configurations
      • oblogproxy parameters
    • Manage access keys
    • Operation audit
  • Troubleshooting Guide
    • Manage OMS services
    • OMS logs
    • Component O&M
      • O&M operations for the Supervisor component
      • CLI-based O&M for the Connector component
      • O&M operations for the Store component
    • Component tuning
      • Incr-Sync/Full-Import tuning
      • Oracle store tuning
    • Set throttling
    • Store performance diagnostics
  • Reference Guide
    • Features
      • Configure DDL/DML synchronization
      • DDL synchronization scope
      • Rename databases and tables
      • Use SQL conditions to filter data
      • Set the incremental synchronization start timestamp
      • Configure matching rules for migration or synchronization objects
      • Configure matching rules for validation objects
      • Wildcard patterns supported for matching rules
      • Hidden column mechanisms
      • Procedure for schema migration
      • Create and update a heartbeat table
      • Change a topic
      • Column filtering and column mapping
      • Data formats
      • Supported SQL Hints
    • API Reference
      • Overview
      • CreateProject
      • StartProject
      • StopProject
      • ResumeProject
      • ReleaseProject
      • DeleteProject
      • ListProjects
      • Query task details
      • DescribeProjectSteps
      • DescribeProjectStepMetric
      • DescribeProjectProgress
      • DescribeProjectComponents
      • ListProjectFullVerifyResult
      • StartProjectsByLabel
      • StopProjectsByLabel
      • CreateMysqlDataSource
      • CreateOceanBaseDataSource
      • CreateOceanBaseODPDataSource
      • CreatePolarDBDataSource
      • CreateMilvusDataSource
      • ListDataSource
      • CreateLabel
      • ListAllLabels
      • DeleteDataSource
      • CreateProjectModifyRecords
      • ListProjectModifyRecords
      • StopProjectModifyRecords
      • RetryProjectModifyRecords
      • CancelProjectModifyRecord
      • SubmitPreCheck
      • GetPreCheckResult
      • UpdateProjectConfig
      • Download schema conversion information
      • DownloadConflictData
      • ListConflictData
      • ResetIncrStartTimestamp
      • AdvanceProject
      • DescribeRegions
      • Create a user
      • Delete a user
      • Query user details
      • Query department list
      • Upload a Kafka authentication file
      • Create a Kafka data source
      • Create a DB2 LUW data source
    • Alert Reference
      • oms_host_down
      • oms_host_down_migrate_resource
      • oms_host_threshold
      • oms_migration_failed
      • oms_migration_delay
      • oms_sync_failed
      • oms_sync_status_inconsistent
      • oms_sync_delay
    • SSO
      • Integrate OMS with OIDC for SSO
      • Integrate the SAML 2.0 protocol to OMS to implement SSO
      • Access Microsoft Entra ID using OMS SAML 2.0
    • OMS error codes
    • SQL statements for querying database objects
    • Create a trigger
    • Change the log level for a PostgreSQL database instance
    • Online DDL tools
    • Supplemental logging in Oracle databases
    • Configure Milvus topics
  • Upgrade Guide
    • Overview
    • Upgrade OMS in single-node deployment mode
    • Upgrade OMS in multi-node deployment mode
    • FAQ
  • FAQ
    • General O&M
      • How do I modify the resource quotas of an OMS container?
      • How do I troubleshoot the OMS server down issue?
      • Deploy InfluxDB for OMS
      • Increase the disk space of the OMS host
    • Task diagnostics
      • How do I troubleshoot common problems with Oracle Store?
      • How do I perform performance tuning for Oracle Store?
      • What do I do when Oracle Store reports an error at the isUpdatePK stack?
      • What do I do when a store does not have data of the timestamp requested by the downstream?
      • What do I do when OceanBase Store failed to access an OceanBase cluster through RPC?
      • How do I use LogMiner to pull data from an Oracle database?
    • OPS & monitoring
      • What are the alert rules?
    • Data synchronization
      • FAQ about synchronization to a message queue
        • What are the strategies for ensuring the message order in incremental data synchronization to Kafka
    • Data migration
      • User privileges
        • What privileges do I need to grant to a user during data migration to or from an Oracle database?
      • Full migration
        • How do I query the ID of a checker?
        • How do I query log files of the Checker component of OMS?
        • How do I query the verification result files of the Checker component of OMS?
        • What do I do if the target table does not exist?
        • What can I do when the full migration failed due to LOB fields?
        • What do I do if garbled characters cannot be written into OceanBase Database V3.1.2?
      • Incremental synchronization
        • How do I skip DDL statements?
        • How do I migrate or synchronize Oracle database objects whose names exceed 30 bytes?
        • How do I update whitelists and blacklists?
        • What are the application scope and limits of ETL?
    • Installation and deployment
      • How do I upgrade Store?
  • Release Note
    • Release Note
      • Version number rules
      • V4.4
        • OMS V4.4.0
      • V4.3
        • OMS V4.3.3
        • OMS V4.3.2
        • OMS V4.3.1
        • OMS V4.3.0
      • V4.2
        • OMS V4.2.5
        • OMS V4.2.4
        • OMS V4.2.3
        • OMS V4.2.2
        • OMS V4.2.1
        • OMS V4.2.0
      • V4.1
        • OMS V4.1.0
      • V4.0
        • OMS V4.0.2
        • OMS V4.0.1
      • V3.4
        • OMS V3.4.0
      • V3.3
        • OMS V3.3.1
        • OMS V3.3.0
      • V3.2
        • OMS V3.2.2
        • OMS V3.2.1
      • V3.1
        • OMS V3.1.0
      • V2.1
        • OMS V2.1.2
        • OMS V2.1.0

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Migration Service
  3. V4.4.0

Migrate data from Elasticsearch to OceanBase Database in MySQL-compatible mode

Last Updated:2026-11-26 09:35:11

Background information
Limitations
Considerations
Prerequisites
Install the Translog incremental plugin
Data type mappings
Procedure

This topic describes how to use OceanBase Migration Service (OMS) to migrate data from Elasticsearch to OceanBase Database in MySQL-compatible mode (including physical data sources, public cloud data sources, and standalone data sources).

Background information

Elasticsearch is a distributed search and analytics engine. Data is organized into indices, which can be analogized to tables in a relational database. OMS supports migrating index data and structures from Elasticsearch to the MySQL-compatible mode of OceanBase Database.

In the OMS console, the data source type for Elasticsearch is displayed as ElasticSearch, and this link only supports the object type Tables. The migration types currently supported by this link are shown in the following table.

Migration Type
Supported Scenarios
Schema Migration Supported
Full Migration Supported
Incremental Synchronization Supported
Incremental DDL Not supported
Reverse Incremental Supported

Limitations

  • Limitations on the source database

    Do not perform DDL operations that modify the index structure during schema migration or full migration. Otherwise, the data migration task may be interrupted.

  • This link does not support incremental DDL. Mapping changes (adding fields or modifying field types) occurring in the source Elasticsearch will not be synchronized to the target, potentially leading to data inconsistency between the source and target.

  • OMS does not support triggers on the target side. If triggers exist, data migration may fail.

  • Data source identifiers and user accounts must be globally unique within the OMS system.

  • OMS only supports migrating objects whose database, table, and column names are in ASCII and do not contain special characters (including line breaks, spaces, and .|"'`()=;/&\).

    Indices with names containing dots (.) are also not supported, for example, api7-ai-logs-2026.07.29. If such objects exist at the source, use the Specify Objects method to individually select the objects you want to migrate. Do not use the Match by Rule method to select objects, as the matching rules will match these objects and cause migration errors.

  • Currently supported Elasticsearch versions are V7.x (V7.6.0 and later), V8.x, and V9.x.

  • It is recommended that you do not migrate more than 1,000 indices at a time to avoid affecting the operation of the data migration task.

  • This link supports the DML types Insert, Update, and Delete for Incremental Synchronization, but the actual DML that can be captured depends on the incremental method:

    • Translog plugin: Can capture Insert, Update, and Delete. This method requires installing the OMS incremental plugin on the Elasticsearch cluster. Installing the plugin requires restarting an Elasticsearch node (rolling restarts can be used). The plugin version must match the full version number of the Elasticsearch server, and the plugin must be installed and restarted on every node in the cluster. Checking only the nodes corresponding to connection addresses is not sufficient to ensure stable task operation; migration may still be interrupted after primary shards move to other nodes. You can execute GET /_nodes/plugins to confirm installation on each node. For details, see the section below titled "Install the Translog incremental plugin".

    • _seq_no pagination query: No plugin installation is required, but Delete operations cannot be captured, and deleted data will remain in the target. If you have selected Delete in the migration options, please choose the Translog plugin method.

  • Migrating indices containing the following field types is not supported: percolator, completion, annotated-text, join (parent-child association), sparse_vector, date_nanos, and flattened. When any of these field types exist, the precheck will block the task and indicate the reason.

  • This link only supports default routing. If the source index has _routing.required=true set, the precheck will intercept the task. Documents using custom routing cannot complete full migration normally.

  • Multi-valued fields (where a document's value for the same field can be an array) must be explicitly configured for migration as JSON type; otherwise, the task will be blocked. If the source field's mapping is a scalar type like keyword but the documents actually store arrays, simply changing the target column to JSON is insufficient for full migration. You must first change the field to a single value at the source, or transform it into a supported object / nested JSON container before migrating.

  • The indices to be migrated must retain _source. OMS relies on the complete _source to read index mappings, settings, and document data. If _source is disabled for the source index, the precheck will block the task and indicate the reason.

Considerations

  • This link does not support partition-related migration capabilities. Do not create partitioned tables at the target before migration.

  • If the document field type at the source does not match the column type at the target, or if the data exceeds the length and precision range of the target column, the data migration task may fail.

  • Schema migration generates the target table structure based on the index mapping snapshot obtained when the task is created. Elasticsearch supports dynamic fields, while the target table structure is fixed. Fields newly added at the source will not be automatically synchronized to the target.

  • When the data types of fields with the same name are inconsistent across different documents within the same index (which is allowed in Elasticsearch but not in OceanBase Database), OMS creates a table based on the data type of the first encountered document. During write operations, records with mismatching data types will be logged as conflicts and the conflicting field will be skipped.

  • For fields with multiple fields (fields) configured, OMS migrates only the primary field. Sub-fields such as city.keyword will not have separate columns created.

  • Index aliases and index templates are not migrated. The actual index that the alias points to needs to be migrated separately.

  • The _es_id column in the target table is used to store the source document ID and serves as the unique key for incremental synchronization and reverse incremental data location. Do not modify or delete this column at the target side; otherwise, UPDATE and DELETE operations will fail to match data.

  • The date type already covers common ISO formats, explicit time zones, and task time zone formats. Any custom format is not yet fully supported. The date_nanos field type is currently not supported for migration, and the precheck will block the task.

  • geo_point supports the {lat,lon} and [lon,lat] formats and outputs them uniformly as lat,lon strings. Currently, formats such as geohash and GeoJSON Point are not supported; geo_shape currently only supports Point, LineString, and Polygon.

  • Vector indexes at the target side are not within the scope of schema migration. Please create them yourself after migration is complete.

  • Before performing a forward switchover, ensure that your business has stopped writing data to the index to be migrated. Stopping writes must be done manually. You can stop writing from the business application side, or disable writing through Elasticsearch's index write block (for example, by setting index.blocks.write to true). OMS does not automatically stop writing at the source. For details, see the official Elasticsearch documentation Index blocks.

  • This link does not support configuring row filters or selecting columns for migration objects; it only supports renaming and removing.

Prerequisites

  • The corresponding Schema 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 in both the source Elasticsearch cluster and the MySQL-compatible mode of the target OceanBase Database, and the relevant permissions have been granted. For details, see the "Permissions required when Elasticsearch is the source" and "Permissions required when Elasticsearch is the target" sections in Create a database user and User permissions.

  • An Elasticsearch data source and an OceanBase Database MySQL-compatible mode data source have been created in OMS. For details, see Create an Elasticsearch data source and Create an OceanBase physical data source.

  • If the Translog plugin method is selected for incremental synchronization, confirm that the OMS incremental plugin has been installed on every node of the Elasticsearch cluster and a rolling restart has been completed, and that the plugin version matches the full version number of the server. You can execute GET /_nodes/plugins to check the installation status node by node. The pagination query method using _seq_no does not require installing this plugin. For installation steps, see the section below titled "Install the Translog incremental plugin".

Install the Translog incremental plugin

When the Translog plugin method is selected as the incremental synchronization method, you need to install the OMS incremental plugin on every node of the source Elasticsearch cluster and perform a rolling restart. The plugin installation package is provided with OMS deployment and is located in the /home/ds/plugins/elasticsearch/ directory of the OMS container. Please select the corresponding ZIP file based on the full version number of the source Elasticsearch.

  1. Query the full version number of Elasticsearch on each node of the source cluster. For example, execute GET /_nodes and check the version field of each node.

  2. Locate the OMS container on the host where OMS resides and check the plugin version provided with the package.

    docker ps
    docker exec <OMS Container Name> ls /home/ds/plugins/elasticsearch/
    
  3. Export the plugin package that matches the source version from the OMS container. Taking a source version of Elasticsearch 7.6.2 as an example:

    docker cp <OMS Container Name>:/home/ds/plugins/elasticsearch/oms-es-ccr-plugin-7x-7.6.2.zip .
    
  4. Distribute the plugin package to each Elasticsearch node in the cluster and execute the installation command in the Elasticsearch installation directory of that node.

    bin/elasticsearch-plugin install file:///tmp/oms-es-ccr-plugin-7x-7.6.2.zip
    

    If Elasticsearch is also deployed in containers, ensure this path is visible within the Elasticsearch container.

  5. Restart Elasticsearch node by node following the rolling restart process for the cluster. Once a node rejoins the cluster and the cluster status recovers, proceed to the next node.

  6. Execute GET /_nodes/plugins to verify that all nodes have loaded the corresponding plugins.

Note

If there is no plugin package in the /home/ds/plugins/elasticsearch/ directory that exactly matches the source version, contact OceanBase Technical Support to confirm the correct installation package.

Data type mappings

Schema migration reads the index's mapping and settings, and generates the corresponding table structure at the target. The following table shows the mapping between Elasticsearch field types and column types in OceanBase Database's MySQL-compatible mode.

Elasticsearch field types
Column types in the MySQL-compatible mode of OceanBase Database
Description
keyword LONGTEXT Exact match fields.ignore_aboveLimits only the index length and does not truncate it._sourceThe actual value in the field is therefore mapped toLONGTEXTto avoid write failures.
wildcard LONGTEXT Fuzzy match fields,_sourceThe value in the field is a normal string.
text LONGTEXT Full-text search fields, whose actual values can be quite long.
match_only_text LONGTEXT textA lightweight variant of , billed by_sourceMigrate the original values.
long BIGINT 64-bit integer.
unsigned_long BIGINT UNSIGNED 64-bit unsigned integer.
integer INT A 32-bit integer.
short SMALLINT 16-bit integer.
byte TINYINT An 8-bit integer.
double DOUBLE Double-precision floating-point number.
float DOUBLE Elasticsearch'sfloatThe index column is of type float32. During migration, it is converted to_sourceDouble-precision values are retained to avoid precision loss.
half_float DOUBLE Half-precision floating-point.
scaled_float DOUBLE Scale floating-point numbers.
date DATETIME(3) Retains millisecond precision.
boolean TINYINT(1) trueWrite1,falseWrite0.
binary LONGBLOB Base64-encoded binary data. The original byte length is unlimited.
ip VARCHAR(45) Compatible with IPv6 addresses.
object JSON JSON object.
nested JSON The nested documents are written into the JSON column as a whole.
geo_point VARCHAR(100) Converted tolat,lonA string in the specified format.
geo_shape GEOMETRY The target OceanBase Database must be V4.x or later.
dense_vector VECTOR(dims) The vector dimension is taken from the index mapping.dimsparameter.dimsWhen the parameter is missing or invalid, the task will be blocked.
rank_feature DOUBLE Rank eigenvalues by_sourceThe original double-precision value is retained.
histogram JSON Histogram data.
alias Not migrate The alias field contains no actual data.

Note

  • Schema migration will additionally generate a _es_id VARCHAR(512) COLLATE utf8mb4_bin column in the target table to store the source document ID, and create a unique index for it.

  • Multi-valued fields must be explicitly configured as JSON type; otherwise, the target column type cannot be determined solely from the mapping.

  • For fields with a mapping of keyword or other scalar types, if a document actually stores an array, simply changing the target column to JSON is insufficient for full migration. First, change the field to a single value at the source, or modify it into a supported object / nested JSON container before migrating.

When Reverse Increment is selected, OMS writes changes back from the target to the source Elasticsearch. The following table shows the correspondence between column types in OceanBase Database's MySQL-compatible mode and Elasticsearch field types.

Column types in the MySQL-compatible mode of OceanBase Database
Elasticsearch field types
VARCHAR / CHAR keyword
LONGTEXT / TEXT text
BIGINT / INT / SMALLINT / TINYINT long / integer
FLOAT / DOUBLE float / double
DATETIME / TIMESTAMP date
TINYINT(1) boolean
JSON object(Determined from the content)
VARBINARY binary(Base64-encoded)

Notice

  • Reverse increment only synchronizes DML, not DDL. Newly added fields at the target will be ignored when written back to Elasticsearch. Fields such as JSON, geospatial, and vector types are retained only as strings, which does not restore the query capabilities of their native Elasticsearch types.

  • Reverse increment only writes back to the original index bound to the migration task. OMS verifies the index UUID. If the original index has been deleted, it cannot be re-written even if rebuilt with the same name. Please retain the original index at the source during migration and reverse increment.

  • After switching services to OceanBase Database, if a column corresponding to dense_vector is inserted or updated to NULL, reverse increment will send an explicit JSON null to the original index, triggering an HTTP 400 mapper_parsing_exception and interrupting the reverse synchronization. Please check the application-side writable path for null values in this column before the switch, and provide valid vectors that match the original index dimensions for this column during reverse increment.

Procedure

  1. Create a data migration task.

    1. Log in to the OMS console.

    2. In the left-side navigation pane, click Data Migration.

    3. On the Data Migration page, click Create Task in the upper-right corner.

  2. 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.

    Notice

    The task name is a unique identifier within the OMS system. Please choose an appropriate name.

  3. In the Select Source and Target step, configure the parameters.

    Parameter
    Description
    Source If you have created an Elasticsearch 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. For details, see Create an Elasticsearch data source.
    Target If you have created a physical data source in 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 details, 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.
  4. Click Next. In the Select Migration Type step, select the migration type for the current data migration task.

    The Migration Type includes Schema Migration, Full Migration, Incremental Synchronization, and Reverse Increment.

    Migration type
    Limitations
    Schema migration After a schema migration task starts, OMS reads the mappings and settings of the source Elasticsearch index and creates corresponding table structures in the target database. For type mapping relationships, see "Data type mappings" in this topic.
    Full migration After a full migration task starts, OMS migrates the existing data of the source Elasticsearch index to the corresponding tables in the target database.
    Incremental synchronization After an incremental synchronization task starts, OMS synchronizes the changed data (inserts, modifications, or deletions) in the source Elasticsearch index to the corresponding tables in the target database.
    The DML synchronization of Incremental Synchronization includes INSERT, DELETE, and UPDATE, which you can configure as needed. For details, see Configure DDL/DML synchronization. This link does not support incremental DDL.
    Incremental data is obtained through the Translog plugin or _seq_no pagination queries. The _seq_no pagination query cannot capture DELETE operations. For details, see "Limitations" in this topic.
    Reverse increment After a reverse increment task starts, it can continuously flow back the change data generated in the target database after the business switch to the source Elasticsearch in real time.
    Typically, reverse increment reuses the configuration of incremental synchronization. You can also configure it according to actual needs. The following situations do not support selecting Reverse Increment:
    • Multiple-table aggregation exists.
    • There are multiple Schema-to-one mappings.

    Reverse increment only writes back to the original index bound to the migration task and verifies the index UUID. If the original index is deleted and then rebuilt with the same name, further writing cannot continue. Therefore, retain the source index during migration.
  5. Click Next. In the Select Migration Objects step, select the objects to be migrated for the current data migration task.

    You can select migration objects through two options: Specify Objects and Match by Rule. This topic describes how to select objects by using Specify Objects. For details on configuring matching rules, see Configure matching rules for migration or synchronization objects.

    1. In the Select Migration Objects step, select Specify Objects.

    2. In the Source Object(s) list, select the objects to be migrated. You can select one or more indexes as migration objects.

    3. Click > to add them to the Target Objects list.

    OMS supports renaming target objects and removing single or all migration objects, but does not support setting row filter conditions or selecting columns.

    Notice

    If you rename migration objects or select objects using matching rules, confirm that each specific source index corresponds to a target table when previewing the mapping results. Different indexes may have the same document _id. Even without selecting reverse incremental migration, mapping them to the same target table can result in data overwriting or accidental deletion. Do not rely on the precheck to detect all such conflicts.

    Operation
    Step
    Rename OMS supports renaming migration objects. For more information, see Rename a database or table.
    Remove/Remove All OMS allows you to remove one or more temporarily selected objects during data mapping.
    • Remove a single migration object
      In the Target Objects list, hover over the target object and click the displayed Remove to remove it.
    • Remove all migration objects
      In the Target Objects list, click Remove All in the upper-right corner. In the dialog box, click OK to remove all migration objects.
  6. 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. You can set whether to automatically proceed to the next stage after schema migration is completed. This migration mode does not support index migration. OMS automatically creates indexes for the destination tables based on the unique _es_id column.

    • Full migration

      The parameters in this section are displayed only if you have selected Full Migration in the Select Migration Type step. You can configure the full migration rate limit, full migration resource configuration, and Processing Strategy When Target Table Has Records.

    • Incremental synchronization

      The parameters in this section are displayed only if you have selected Incremental Synchronization in the Select Migration Type step. You can configure Incremental data capture method, incremental synchronization rate limit, incremental log pull resource configuration, incremental data write resource configuration, and incremental record retention time.

      Notice

      This mode does not support specifying an incremental synchronization start timestamp. By default, synchronization starts from the current time.

    • Reverse incremental

      The parameters in this section are displayed only if you have selected Reverse Increment in the Select Migration Type step. The configuration parameters for reverse incremental are the same as those for incremental synchronization. You can select Reuse Incremental Synchronization Configuration in the upper-right corner.

    If the page's configuration parameters do not meet your needs, you can click Parameter Configuration at the bottom of the page for more specific settings. If you have configured task templates or component templates, you can also reference them here.

  7. Click Precheck to have the system perform a precheck on the data migration task.

    During the Precheck phase, OMS checks whether the database's network connection meets requirements. The data migration task can only be started after all check items 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 the operation. After confirming it is acceptable to skip, click OK in the dialog box.

  8. 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 as needed.

    You can click Configure Validation Task in the upper-right corner of the data migration details page to compare data differences between the source Elasticsearch cluster and the target database. For more information, see Create a data verification task.

    OMS supports modifying migration objects during the execution of a data migration task. For more information, see View and modify migration objects. After a data migration task is started, it is executed sequentially according to the selected migration type. For more information, see the "View migration details" section in View the details of a data migration task.

Previous topic

Migrate data from DM Database to OceanBase Database in Oracle compatible mode
Last

Next topic

Migrate data from a SQL Server database to OceanBase Database in MySQL-compatible mode
Next
on this page
Background information
Limitations
Considerations
Prerequisites
Install the Translog incremental plugin
Data type mappings
Procedure