OceanBase
English日本語简体中文
ドキュメントホーム
製品
エコシステム
リリース

データベース

OceanBase CloudOceanBaseデータベース

ツール

OceanBase Cloud PlatformOceanBase移行サービス(OMS)OceanBaseデベロッパーセンターOceanBase Admin Tool

データベース

OceanBase CloudOceanBaseデータベース

ツール

OceanBase Cloud PlatformOceanBase移行サービス(OMS)OceanBaseデベロッパーセンターOceanBase Admin Tool
OceanBase CloudOceanBaseデータベース

OceanBase移行サービス(OMS)

V4.3.3Enterprise Edition
  • OMSドキュメント
  • OMSの概要
    • OMSの概要
    • 用語解説
    • OMS高可用性(HA)の紹介
    • Storeの原理
    • Full-Import/Incr-Syncデータ転送の原理
    • データ検証の原理について
    • システムアーキテクチャ
      • アーキテクチャ概要
      • 機能アーキテクチャ
      • コンポーネントの基本原理
    • OMS Oracle 全量移行の設計原理と影響
    • 制限事項
  • クイックスタート
    • データ移行プロセス
    • データ同期プロセス
  • OMSのデプロイ
    • デプロイメントタイプ
    • システムとネットワーク要件
    • メモリとディスク要件
    • 環境の準備
    • シングルノードデプロイ
    • 単一リージョン・マルチノード構成
    • 複数リージョン・複数ノードへのデプロイ
    • スケールアウトデプロイメント
    • スケールインのデプロイ
    • デプロイ状態の確認
    • (オプション)時系列データベースのデプロイ
  • 管理コンソール
    • OMSコンソールへのログイン
    • マネジメントコンソールの紹介
    • 個人設定
      • 個人情報の設定
      • ログインパスワードの変更
      • ログアウト
  • データ移行
    • データ移行の概要
    • MySQLデータベースのデータをOceanBaseデータベースのMySQL互換モードに移行する
    • OceanBaseデータベースのMySQL互換モードのデータをMySQLデータベースに移行する
    • OracleデータベースのデータをOceanBaseデータベースのMySQL互換モードに移行する
    • OceanBaseデータベースのOracle互換モードのデータをOracleデータベースに移行する
    • OracleデータベースのデータをOceanBaseデータベースのOracle互換モードに移行する
    • DB2 LUWデータベースのデータをOceanBaseデータベースのOracle互換モードに移行する
    • OceanBaseデータベースのOracle互換モードのデータをDB2 LUWデータベースに移行する
    • DB2 LUWデータベースのデータをOceanBaseデータベースのMySQL互換モードに移行する
    • OceanBaseデータベースのMySQL互換モードのデータをDB2 LUWデータベースに移行する
    • OceanBaseデータベース間のデータ移行
    • 双方向同期タスクの設定
    • TiDBデータベースのデータをOceanBaseデータベースのMySQL互換モードに移行する
    • PostgreSQLデータベースのデータをOceanBaseデータベースのOracle互換モードに移行する
    • PostgreSQLデータベースのデータをOceanBaseデータベースのMySQL互換モードに移行する
    • PolarDB-X 1.0データベースのデータをOceanBaseデータベースのMySQL互換モードに移行する
    • MilvusデータベースのデータをOceanBaseデータベースのMySQL互換モードに移行する
    • OBShardingデータベースのデータをOceanBaseデータベースのMySQL互換モードに移行する
    • OceanBaseデータベースのOracle互換モードからMySQLデータベースへの増分データ移行
    • データ移行タスクの管理
      • データ移行タスクの詳細を表示する
      • データ移行タスクの名前を変更する
      • 移行対象オブジェクトの表示と変更
      • タグを使用したデータ移行タスクの管理
      • データ移行タスクの一括操作
      • 移行対象オブジェクト設定のダウンロードとインポート
      • 移行パラメータ設定の確認と変更
      • 競合ログファイルのダウンロード
      • データ移行タスクの開始と一時停止
      • データ移行タスクの終了と削除
    • DDL同期のサポート範囲と制限事項
      • MySQLデータベースからOceanBaseデータベースのMySQL互換モードへのDDL同期
        • MySQLデータベースからOceanBaseデータベースのMySQL互換モードへのDDL同期の概要
        • テーブルの作成 CREATE TABLE
          • テーブルの作成
          • 列の作成
          • インデックスまたは制約の作成
          • パーティションの作成
        • データ型の変換
        • テーブルの変更 ALTER TABLE
          • テーブルの変更
          • フィールド操作
          • 制約とインデックスの操作
          • パーティション操作
        • テーブルの全行削除 TRUNCATE TABLE
        • テーブルの名前変更 RENAME TABLE
        • テーブルの削除 DROP TABLE
        • インデックスの作成 CREATE INDEX
        • インデックスの削除 DROP INDEX
        • MySQLデータベースとOceanBaseデータベースのMySQL互換モード間のDDLの非互換点
          • 非互換点の概要
          • CREATE TABLEの非互換点
            • CREATE TABLEの非互換点
            • インデックスまたは制約でサポートされるフィールドタイプ
          • ALTER TABLEの非互換点
            • ALTER TABLEの非互換点
            • 制約のある列の型の変更
            • 制約のない列の型の変更
            • 制約のある列の長さの変更
            • 制約のない列の長さの変更
            • 制約を持つ列の削除
          • インデックスの削除DROP INDEXの非互換点
      • OceanBaseデータベースのMySQL互換モードからMySQLデータベースへのDDL同期
      • OracleデータベースからOceanBaseデータベースのOracle互換モードへのDDL同期
        • OracleデータベースからOceanBaseデータベースのOracle互換モードへのDDL同期の概要
        • テーブルの作成 CREATE TABLE
          • テーブル作成の概要
          • リレーショナルテーブルの作成
            • リレーショナルテーブルの作成
            • リレーショナルテーブルの列定義
          • 仮想列
          • 通常列
          • パーティションの作成
            • パーティションの概要
            • パーティション
            • サブパーティション
            • 複合パーティション
            • カスタムパーティション
            • サブパーティションテンプレート
          • 制約
            • 制約の概要
            • 行内制約
            • 行外制約
        • インデックスの作成 CREATE INDEX
          • インデックス作成の概要
          • 通常のテーブルインデックス
        • テーブルの変更 ALTER TABLE
          • テーブル変更の概要
          • テーブル属性の変更、削除、追加
          • 列属性の管理
            • 列属性の変更、削除、追加
            • 列名の変更
            • 列と列属性の追加
            • 列属性の変更
            • 列の削除操作
          • 制約の変更、削除、追加
          • パーティションの管理
            • パーティションの変更、削除、追加
            • パーティションの削除
            • サブパーティションの削除
            • パーティションとサブパーティションの追加
            • パーティションの変更
            • パーティションデータの削除
        • テーブルの削除 DROP TABLE
        • 名前の変更 RENAME OBJECT
        • テーブルの全行削除 TRUNCATE TABLE
        • インデックスの削除 DROP INDEX
        • OracleデータベースとOceanBaseデータベースのOracle互換モード間のDDLの非互換点
          • 非互換点の概要
          • CREATE TABLEの非互換点
          • ALTER TABLEの非互換点
            • ALTER TABLEの非互換点
            • 制約のある列の型の変更
            • 制約のない列の型の変更
            • 制約のある列の長さの変更
            • 制約のない列の長さの変更
      • OceanBaseデータベースのOracle互換モードからOracleデータベースへのDDL同期
      • DB2 LUWデータベースからOceanBaseデータベースのOracle互換モードへのDDL同期
      • OceanBaseデータベースのOracle互換モードからDB2 LUWデータベースへのDDL同期
      • DB2 LUWデータベースからOceanBaseデータベースのMySQL互換モードへのDDL同期
      • OceanBaseデータベースのMySQL互換モードからDB2 LUWデータベースへのDDL同期
      • OceanBaseデータベースのMySQL互換モード間でのDDL同期
      • OceanBaseデータベースのOracle互換モード間でのDDL同期
      • PostgreSQLデータベースからOceanBaseデータベースのMySQL互換モードへのDDL同期
      • PostgreSQLデータベースからOceanBaseデータベースのOracle互換モードへのDDL同期
      • OBShardingデータベースからOceanBaseデータベースのMySQL互換モードへのDDL同期
  • データ同期
    • データ同期の概要
    • OceanBaseデータベースのデータをKafkaに同期する
    • OceanBaseデータベースのデータをRocketMQに同期する
    • OceanBaseデータベースのデータをDataHubに同期する
    • OceanBaseデータベースのデータをSwiftに同期する
    • ODPの論理テーブルデータをOceanBaseデータベースのMySQL互換モードの物理テーブルに同期する
    • ODPの論理テーブルデータをDataHubに同期する
    • IDBの論理テーブルデータをOceanBaseデータベースのMySQL互換モードに同期する
    • IDBの論理テーブルデータをDataHubに同期する
    • MySQLデータベースのデータをDataHubに同期する
    • OracleデータベースのデータをDataHubに同期する
    • OBShardingデータベースのデータをKafkaに同期する
    • データ同期タスクの管理
      • データ同期タスクの詳細を表示する
      • データ同期タスクの名前を変更する
      • 同期オブジェクトの表示と変更
      • タグを使用したデータ同期タスクの管理
      • データ同期タスクの一括操作
      • 同期対象設定のダウンロードとインポート
      • 同期パラメータ設定の確認と変更
      • データ同期タスクの開始と一時停止
      • データ同期タスクの終了と削除
  • データ検証
    • データ検証の概要
    • データ検証タスクの新規作成
    • データ検証タスクの管理
      • データ検証タスクの詳細を表示する
      • データ検証タスクの名前を変更する
      • 検証オブジェクトの表示と変更
      • 検証パラメータの確認と変更
      • タグを使用したデータ検証タスクの管理
      • 検証オブジェクトのインポート
      • データ検証タスクの開始、一時停止、および再開
      • データ検証タスクのクローン
      • データ検証タスクの削除
  • データソースの作成と管理
    • データソースの作成
      • OceanBaseデータソースの作成
        • OceanBase物理データソースの作成
        • ODPデータソースの作成
        • IDBデータソースの作成
        • OceanBaseパブリッククラウドデータソースの作成
        • OceanBase単一マシンデータソースの作成
      • MySQLデータソースの作成
      • Oracleデータソースの作成
      • TiDBデータソースの新規作成
      • Milvusデータソースの新規作成
      • Kafkaデータソースの作成
      • RocketMQデータソースの作成
      • DataHubデータソースの新規作成
      • Swiftデータソースの作成
      • DB2 LUWデータソースの作成
      • PostgreSQLデータソースの作成
      • PolarDB-X 1.0データソースの新規作成
      • OBShardingデータソースの作成
    • データソースの管理
      • データソース情報の表示
      • データソースのコピー
      • データソースの編集
      • データソースの削除
    • データベースユーザーの作成
    • ユーザー権限の説明
    • MySQLデータベースでBinlogを有効にする
    • ソース側Oracleデータベースの最小権限
  • 運用監視
    • 運用概要
    • 概要ページにアクセスする
    • マシン
      • マシン情報の表示
      • マシンの追加
      • マシンの削除
      • Quotaの更新
      • マシンのログを表示する
      • リソースグループの管理
    • コンポーネント
      • Store
        • Storeの追加
        • Storeコンポーネントの詳細を表示する
        • Storeコンポーネントの更新
        • Storeコンポーネントの起動と一時停止
        • Storeコンポーネントの削除
      • Incr-Sync
        • Incr-Syncコンポーネントの詳細を表示する
        • Incr-Syncコンポーネントの起動と一時停止
        • Incr-Syncコンポーネントの移行
        • Incr-Syncコンポーネントの更新
        • バッチ運用保守
        • Incr-Syncコンポーネントの削除
      • Full-Import
        • Full-Importコンポーネントの詳細を表示する
        • Full-Importコンポーネントの一時停止
        • Full-Importコンポーネントの再実行と再開
        • Full-Importコンポーネントの更新
        • Full-Importコンポーネントの削除
      • Full-Verification
        • Full-Verificationコンポーネントの詳細を表示する
        • Full-Verificationコンポーネントの一時停止
        • Full-Verificationコンポーネントの再実行と再開
        • Full-Verificationコンポーネントの更新
      • Incr-Verification
        • Incr-Verificationコンポーネントの詳細を表示する
        • Incr-Verificationコンポーネントの一時停止
        • Incr-Verificationコンポーネントの再実行と再開
        • Incr-Verificationコンポーネントの更新
      • Row-Verification
        • Row-Verificationコンポーネントの詳細を表示する
    • 運用管理タスク
      • オペレーションタスクの表示
      • タスクまたはサブタスクのスキップ
      • タスクまたはサブタスクの再試行
    • パラメータテンプレート
      • 概要
      • タスクテンプレート
        • タスクテンプレートの作成
        • タスクテンプレートの表示と編集
        • タスクテンプレートのコピーとエクスポート
        • タスクテンプレートの削除
      • コンポーネントテンプレート
        • コンポーネントテンプレートの作成
        • コンポーネントテンプレートの表示と編集
        • コンポーネントテンプレートのコピーとエクスポート
        • コンポーネントテンプレートの削除
      • コンポーネントパラメータの説明
        • Storeコンポーネントのパラメータ説明
        • Incr-Syncコンポーネントのパラメータ説明
        • Full-Importコンポーネントのパラメータ説明
        • Full-Verificationコンポーネントのパラメータ説明
        • Incr-Verificationコンポーネントのパラメータ説明
        • Row-Verificationコンポーネントのパラメータ説明
        • CMコンポーネントパラメータ説明
        • Supervisorコンポーネントのパラメータ説明
  • システム管理
    • 権限管理
      • 権限管理の概要
      • ユーザー管理
      • 部門管理
    • アラート管理
      • タスクのアラート情報を表示する
      • システムアラート情報の表示
      • アラート設定
    • OCPの関連付け
    • システムパラメータ
      • システムパラメータの変更
      • 高可用性機能の設定を変更する
      • oblogproxyパラメータの説明
    • キーの管理
    • 操作監査
  • トラブルシューティングガイド
    • OMSサービスの管理
    • OMSログのトラブルシューティング
    • コンポーネントの運用
      • Supervisorコンポーネントの運用
      • Connectorのコマンドライン操作インターフェース
      • Storeコンポーネントの運用
    • コンポーネントのチューニング
      • Incr-Sync/Full-Importのチューニング
      • Oracle Storeのチューニング
    • スロットリングとレート制限の設定方法
    • Storeコンポーネントのパフォーマンス診断について
  • リファレンスガイド
    • 機能紹介
      • DDL/DMLのカスタム設定
      • DDL同期範囲
      • データベース・テーブルの名前変更
      • SQL条件によるデータのフィルタリング
      • 増分同期の開始タイムスタンプの設定
      • 移行または同期オブジェクトのマッチングルールの設定
      • 検証対象のマッチングルールを設定する
      • ワイルドカード規則の説明
      • データ移行サービスの隠し列メカニズムについて
      • 構造移行操作の説明
      • ハートビートテーブルの作成と更新
      • Topicの変更
      • 列フィルタリングと列マッピング
      • データ形式の説明
    • APIリファレンス
      • 概要
      • タスクの作成
      • タスクの開始
      • タスクの一時停止
      • タスクの再開
      • タスクの解放
      • タスクの削除
      • タスクリストのページ単位の取得
      • タスクの詳細を照会する
      • タスクのステップの詳細を照会する
      • タスクのステップメトリクスの照会
      • タスクの進捗状況を照会する
      • タスクのコンポーネント情報を照会する
      • タスクの全量検証結果を照会する
      • 指定したラベルが付いた開始されていないすべてのタスクを開始する
      • 指定したラベルが付いた実行中のすべてのタスクを一時停止する
      • MySQLデータソースの作成
      • OceanBaseデータソースの作成
      • ODPデータソースの作成
      • PolarDB-X 1.0データソースの作成
      • Milvusデータソースの作成
      • データソースリストの取得
      • ラベルの作成
      • ラベルリストの取得
      • データソースの削除
      • 転送オブジェクトの変更
      • タスクの変更履歴を照会する
      • 変更操作の中止
      • 変更操作の再試行
      • 変更のキャンセル
      • タスクの事前チェック
      • 事前チェック結果の取得
      • タスク設定の更新
      • テーブル構造変換情報のダウンロード
      • 競合ログファイルのダウンロード
      • 競合ログファイルリストの取得
      • 正逆方向の増分同期の同期ポイントを変更する
      • タスクの実行を進める
      • リージョンリストの取得
      • ユーザーの作成
      • ユーザーの削除
      • ユーザー詳細の取得
      • 部門リストの取得
      • Kafka認証ファイルのアップロード
      • Kafkaデータソースの作成
      • DB2 LUWデータソースの作成
    • アラートリファレンス
      • oms_host_down OMSマシンダウンアラート
      • oms_host_down_migrate_resource OMSマシンダウン時の移行アラート
      • oms_host_threshold OMSマシンのしきい値アラート
      • oms_migration_failed 移行タスク失敗
      • oms_migration_delay 移行タスクの遅延
      • oms_sync_failed 同期タスクの失敗
      • oms_sync_status_inconsistent 同期タスクの状態が一致しない
      • oms_sync_delay 同期タスクの遅延
    • シングルサインオン
      • OMSにOIDCプロトコルを接続してシングルサインオンを実現する
      • OMSがSAML 2.0プロトコルに接続してシングルサインオンを実装する
      • OMS SAML 2.0によるMicrosoft Entra IDへのアクセス
    • OMSエラーコード
    • データベースオブジェクトのクエリ
    • トリガーの作成
    • PostgreSQLデータベースインスタンスのログレベルを変更する
    • Online DDLツールへの対応について
    • Oracleデータベースの補足ログに関する説明
    • Milvusトピックの設定
  • アップグレードガイド
    • 概要
    • シングルノードでのアップグレード
    • 複数ノードでのアップグレード
    • よくある質問
  • リリースノート
    • リリースノート
      • バージョン番号ルール
      • 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

PDF をダウンロード

このページには現在中国語/日本語版がなく、英語版を表示しています。
ドキュメントフィードバック
  1. ドキュメントセンター
  2. OceanBase移行サービス(OMS)
  3. V4.3.3

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

最終更新: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.

次のトピック

OMSドキュメント
次へ
このページの内容
Background information
Limitations
Considerations
Prerequisites
Install the Translog incremental plugin
Data type mappings
Procedure