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

Databases

OceanBase DatabaseOceanBase Cloud OceanBase 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 Service

Connectors and Middleware

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

Databases

OceanBase DatabaseOceanBase Cloud OceanBase 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 Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Deployer

V3.2.1Community Edition
  • What is obd
  • Quick Start
    • Install obd
    • Quickly deploy OceanBase Database
    • Quickly deploy OCP
  • obd Command
    • Quick deployment command
    • Cluster commands
    • Mirror and repository commands
    • Testing commands
    • Tool commands
    • obdiag commands
    • Binlog commands
    • Host commands
    • License commands
    • Password commands
    • Telemetry commands
  • User Guide
    • Overview
    • Deploy through GUI
      • GUI operation overview
      • Mode configuration rules
      • Deploy an OceanBase cluster on the GUI
      • Deploy OCP through the GUI
      • Modify components on the GUI
      • Upgrade OCP on the GUI
    • Deploy through CLI
      • Configuration files
      • Deploy Component
        • Deploy OceanBase Database on a single OBServer node
        • Deploy OCP Express by using commands
        • Deploy and use obconfigserver
        • Deploy the obbinlog
        • Deploy oblogproxy by using the CLI
        • Deploy OCP by using commands
      • Manage Cluster
        • Physical Standby Database
          • Deploy primary and standby tenants by using obd
          • Switch the roles of tenants and decouple a standby tenant from the primary tenant
        • Scale out a cluster and change cluster components
        • Performance test
        • Cluster diagnotistics
        • Add GUI-based monitoring for an existing cluster
      • Takeover Cluster
        • Use OCP to take over a cluster deployed by obd
        • Use obd to take over a cluster
      • Upgrade Component
        • Upgrade OceanBase Database
        • Upgrade ODP
        • Upgrade OCP Express
      • Backup and restore
  • Upgrade obd
  • FAQ
  • Error codes
  • Release Notes
    • Version rules
    • V3.2
      • OceanBase Deployer V3.2.2
      • OceanBase Deployer V3.2.1
      • OceanBase Deployer V3.2.0
    • V3.1
      • OceanBase Deployer V3.1.2
      • OceanBase Deployer V3.1.1
      • OceanBase Deployer V3.1.0
    • V3.0
      • OceanBase Deployer V3.0.1
      • OceanBase Deployer V3.0.0
    • V2.10
      • OceanBase Deployer V2.10.1
      • OceanBase Deployer V2.10.0
    • V2.9
      • OceanBase Deployer V2.9.2
      • OceanBase Deployer V2.9.1
      • OceanBase Deployer V2.9.0
    • V2.8
      • OceanBase Deployer V2.8.0
    • V2.7
      • OceanBase Deployer V2.7.0
    • V2.6
      • OceanBase Deployer V2.6.2
      • OceanBase Deployer V2.6.1
      • OceanBase Deployer V2.6.0
    • V2.5
      • OceanBase Deployer V2.5.0
    • V2.4
      • OceanBase Deployer V2.4.0
    • V2.3
      • OceanBase Deployer V2.3.1
      • OceanBase Deployer V2.3.0
    • V2.2
      • OceanBase Deployer V2.2.0
    • V2.1
      • OceanBase Deployer V2.1.1
      • OceanBase Deployer V2.1.0
    • V2.0
      • OceanBase Deployer V2.0.1
      • OceanBase Deployer V2.0.0
    • V1.6
      • OceanBase Deployer V1.6.2
      • OceanBase Deployer V1.6.1
      • OceanBase Deployer V1.6.0
    • V1.5
      • OceanBase Deployer V1.5.0
    • V1.4
      • OceanBase Deployer V1.4.0
    • V1.3
      • OceanBase Deployer V1.3.3
      • OceanBase Deployer V1.3.2
      • OceanBase Deployer V1.3.0
    • V1.2
      • OceanBase Deployer V1.2.1
      • OceanBase Deployer V1.2.0

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Deployer
  3. V3.2.1

Use OCP to take over a cluster deployed by obd

Last Updated:2026-10-09 07:44:00

Prerequisites
Procedure
Step 1: Check whether the cluster meets the conditions
Step 2: Modify cluster configurations
Step 3: Use OCP to take over the cluster

This topic describes what you need to do in OceanBase Deployer (obd) before you can use OceanBase Cloud Platform (OCP) Community Edition to take over an OceanBase cluster deployed by obd.

Prerequisites

Make sure that the following conditions are met:

  • You have installed obd V1.3.0 or later. We recommend that you install the latest version. For more information, see Install obd.

  • You have installed OCP Community Edition V3.1.1 or later. We recommend that you install the latest version.

  • Only one observer process runs on each OBServer node.

  • You have created the admin user with password-free sudo access on each OBServer node, and set up password-free SSH login from the central control server to the admin user on the OBServer node. For more information, see Create a user and Set password-free SSH login.

Procedure

Note

  • In this example, the cluster to take over is named test. You must replace it with the actual cluster name. You can run the obd cluster list command to query the name of a deployed cluster. In the output, the value in the Name column is the cluster name.

  • For more information about the obd commands used in this topic, see Cluster commands.

Step 1: Check whether the cluster meets the conditions

Before you use OCP to take over an OceanBase cluster deployed by obd, you must first run the following command to check whether the cluster meets the takeover conditions. If not, you need to make modifications as prompted.

obd cluster check4ocp test

Step 2: Modify cluster configurations

  1. Change the style of the configuration file.

    The configuration file in the default style does not support configuring Internet data center (IDC) information. Therefore, you need to run the following command to change the style of the configuration file to cluster:

    obd cluster chst test -c oceanbase-ce --style cluster
    

    The output is as follows:

    Load param plugin ok
    Change style ok
    Trace ID: 724b42f2-21a4-11f0-ad48-00163e088dda
    If you want to view detailed obd logs, please run: obd display-trace 724b42f2-21a4-11f0-ad48-00163e088dda
    
  2. Configure IDC information.

    Run the following command to open the configuration file and add IDC information for zones:

    obd cluster edit-config test
    

    After IDC information is added, you must run the obd cluster reload test command for the modifications to take effect. Here is a sample configuration file with IDC information added:

    ## Only need to configure when remote login is required
    user:
      username: admin
    #   password: your password if need
      key_file: /home/admin/.ssh/id_rsa
    oceanbase-ce:
      style: cluster
      name: test
      config:
        devname: eth0
        scenario: htap
        memory_limit: 64G
        system_memory: 30G
        datafile_size: 200G
        datafile_next: 200G
        datafile_maxsize: 1T
        log_disk_size: 200G
        cpu_count: 16
        rpc_port: 2882
        mysql_port: 2881
        obshell_port: 2886
        home_path: /home/admin/observer
        root_password: ********
      zones:
        zone1:
          idc: idc1   --- Set the IDC of zone1 to idc1.
          servers:
          - name: server1
            ip: xxx.xxx.xxx.xxx
        zone2:
          idc: idc2    --- Set the IDC of zone2 to idc2.
          servers:
          - name: server2
            ip: xxx.xxx.xxx.xxx
        zone3:
          idc: idc3     --- Set the IDC of zone3 to idc3.
          servers:
          - name: server3
            ip: xxx.xxx.xxx.xxx
    
  3. (Optional) Configure a password.

    When you use OCP to take over a cluster, you must enter the password of the root user in the sys tenant for connecting to the cluster. If a password has been configured for the root@sys user in the cluster, skip this step.

    If no password is configured for the root@sys user in the cluster, run the following command to open the configuration file and configure the root_password parameter for the cluster:

    obd cluster edit-config test
    

    Find oceanbase-ce and configure the root_password parameter under config. After you save the setting, you must run the obd cluster reload test command for the modification to take effect. Here is an example:

    oceanbase-ce:
      style: cluster
      name: test
      config:
        root_password: ********
    
  4. (Optional) Change the user.

    OCP requires that the observer process be started by the admin user with password-free sudo access. If the cluster to take over is deployed by the admin user, namely that the value of username under user is admin, skip this step.

    If the cluster to take over is not deployed by the admin user, run the following command to open the configuration file and change the deployment user:

    obd cluster edit-config test
    

    Change the deployment user to admin. After that, you must run the obd cluster restart test --wp command for the modification to take effect. Here is an example:

    user:
      username: admin
    #   password: your password if need
      key_file: /home/admin/.ssh/id_rsa
    

Note

After you finish the preceding operations, you can run the obd cluster check4ocp <deploy name> command again to confirm whether the cluster meets the takeover conditions. If not, make modifications as prompted.

Step 3: Use OCP to take over the cluster

For more information about how to take over an OceanBase cluster by using OCP, see Take over a cluster.

After the takeover, you must create an OceanBase Database Proxy (ODP) cluster and associate it with the OceanBase cluster that has been taken over. For more information, see Create an OBProxy cluster.

If the original ODP cluster uses a VIP as its access address, you can add the nodes in the new ODP cluster to the VIP, and then remove the original ODP nodes from the VIP one by one.

FAQ

  1. Can I reuse original hosts when I create a new ODP cluster?

    Yes. If your original ODP cluster is deployed across multiple hosts and accessed through a VIP, you can remove the cluster nodes from the hosts one by one, deploy the new OCP cluster on the same hosts, and add the new nodes to the VIP, thereby reusing the hosts.

  2. Can I choose not to create a new ODP cluster?

    Yes. The original ODP cluster can still connect to the OceanBase cluster that has been taken over. However, we recommend that you create a new ODP cluster in OCP to facilitate subsequent O&M.

Previous topic

Add GUI-based monitoring for an existing cluster
Last

Next topic

Use obd to take over a cluster
Next
on this page
Prerequisites
Procedure
Step 1: Check whether the cluster meets the conditions
Step 2: Modify cluster configurations
Step 3: Use OCP to take over the cluster