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

V4.3.0Community Edition
  • What is obd
  • Quick Start
    • Install obd
    • Quick deployment of OceanBase Database
    • Quickly deploy OCP
  • obd Command
    • Quick deployment commands
    • Cluster commands
    • Command groups
    • Image and repository commands
    • Test command groups
    • Tool commands
    • obdiag commands
    • Binlog service commands
    • Hardware commands
    • License commands
    • Password commands
    • Telemetry commands
  • User Guide
    • Usage overview
    • Deploy through GUI
      • Overview
      • Pattern configuration rules
      • Deploy an OceanBase cluster
      • Deploy OCP
      • Deploy OMS
      • Change components
      • Upgrade OCP
      • Upgrade OMS
    • Deploy through CLI
      • Configuration file
      • Component deployment
        • Deploy an OceanBase cluster
        • Deploy seekdb
        • Deploy obconfigserver
        • Deploy OMS
        • Deploy OCP
        • Deploy Alertmanager
        • Deploy obbinlog
        • Deploy oblogproxy
      • Cluster management
        • Physical Standby Database
          • Create a standby tenant
          • Role switching and decoupling
          • Switch the synchronization mode between primary and standby tenants
        • seekdb primary/standby instance
          • Create a standby instance
          • Role switching and decoupling
        • Scale out and component changes
        • Performance test
        • Diagnose a cluster
        • Backup and restore
        • Add a GUI monitoring system to an existing cluster
      • Cluster management
        • Use OCP to take over an OceanBase cluster deployed by obd
        • Take over an OceanBase cluster
      • Component upgrade
        • Upgrade OceanBase Database
        • Upgrade ODP
        • Upgrade OMS
  • Upgrade obd
  • FAQ
  • Error codes
  • Release Notes
    • Version rules
    • V4.3
      • OceanBase Deploy V4.3.0
    • V4.2
      • OceanBase Deployment Tool V4.2.0
    • V4.1
      • OceanBase Deployer V4.1.0
    • V4.0
      • OceanBase Deployer V4.0.0
    • V3.6
      • OceanBase Deployer V3.6.0
    • V3.5
      • OceanBase Deployer V3.5.0
    • V3.4
      • OceanBase Deployer V3.4.0
    • V3.3
      • OceanBase Deployer V3.3.0
    • 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 Deployment Tool V2.8.0
    • V2.7
      • OceanBase Deployment Tool V2.7.0
    • V2.6
      • OceanBase Deployment Tool V2.6.2
      • OceanBase Deployment Tool V2.6.1
      • OceanBase Deployment Tool V2.6.0
    • V2.5
      • OceanBase Deployer V2.5.0
    • V2.4
      • OceanBase Deployer V2.4.0
    • V2.3
      • OceanBase Deployment Tool V2.3.1
      • OceanBase Deployer V2.3.0
    • V2.2
      • OceanBase Deployment Tool V2.2.0
    • V2.1
      • OceanBase Deployer V2.1.1
      • OceanBase Deployment Tool V2.1.0
    • V2.0
      • OceanBase Deployment Tool V2.0.1
      • OceanBase Deployment Tool 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
  • Interactive deployment of OceanBase Database Community Edition
  • Deploy a Community Edition cluster using the obd graphical interface
  • Deploy a Community Edition cluster by using an obd configuration file

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Deployer
  3. V4.3.0

Create a standby instance

Last Updated:2026-09-04 08:21:29

Concepts
Prerequisites
Procedure
References

This topic describes how to use obd to create a standby instance of the database named seekdb.

Concepts

The primary/standby architecture is a high-availability solution provided by seekdb. It synchronizes data from the primary instance to the standby instance, which is a read-only instance. When the primary instance is unavailable due to planned or unplanned reasons, the standby instance can take over the service to minimize service downtime and reduce potential data loss.

The primary instance (PRIMARY) is a business instance created by the user and supports complete database capabilities, including queries, DML, and DDL operations. The standby instance (STANDBY) only provides disaster recovery and read-only capabilities.

Prerequisites

  • The primary instance of seekdb must be of V1.2.0 or later and managed by obd.

    The default primary instance of seekdb is managed by obd. If the primary instance of seekdb is not managed by obd, you can use obd to take over the corresponding instance. For more information, see the Take over the instance section in Use obd to take over an instance.

  • The primary instance must be running. You can execute the obd seekdb display command to check the status of the primary instance of seekdb.

  • For a simple experience, the primary instance must have at least 1C1GB memory and 3GB of log disk space. For long-term use, we recommend that the primary instance have at least 1C4GB memory.

Procedure

This section describes how to create a standby instance in three scenarios.

  • Scenario 1: One primary instance and one standby instance

    In this scenario, two instances of the seekdb type exist: seekdb_A is the primary instance, and seekdb_B is the standby instance of seekdb_A.

  • Scenario 2: One primary instance and two standby instances

    In this scenario, three instances of the seekdb type exist: seekdb_A is the primary instance, and seekdb_B and seekdb_C are the standby instances of seekdb_A.

  • Scenario 3: Cascading primary and standby instances

    In this scenario, three instances of the seekdb type exist: seekdb_A is the primary instance, seekdb_B is the standby instance of seekdb_A, and seekdb_C is the standby instance of seekdb_B.

Scenario 1: One primary instance and one standby instance
Scenario 2: One primary instance and two standby instances
Scenario 3: Cascading primary and standby instances
  1. Create a standby instance

    Execute the following command to create a standby instance. This command starts an interactive deployment process. In the interactive deployment process, configure the information of the seekdb standby instance and select the deployment name of the primary instance. For more information about how to execute this command, see the Interactive deployment of seekdb section in Deploy seekdb.

    obd seekdb install --standby
    
  2. View the primary-standby relationship of the seekdb instance

    obd seekdb display seekdb_B -g
    

    The -g parameter displays the primary-standby instance topology. The output is as follows:

    Get local repositories and plugins ok
    Open ssh connection ok
    Connect to seekdb 10.10.10.1:2881 ok
    Wait for seekdb init ok
    +--------------------------------+
    |             seekdb             |
    +---------------+---------+------+
    | ip            | version | port |
    +---------------+---------+------+
    | 10.10.10.1    | 1.2.0.0 | 2881 |
    +---------------+---------+------+
    obclient -h10.10.10.1 -P2881 -uroot -p'********' -Doceanbase -A
    
    Cluster Topology:
    
    seekdb_A
    └── seekdb_B
    
  3. Verify the synchronization

    Log in to the standby instance and execute the following command to view the synchronization status.

    MySQL [(oceanbase)]> select * from __all_virtual_server_stat\G
    

    The output is as follows:

    *************************** 1. row ***************************
                     svr_ip: 127.0.0.1
                   svr_port: 2882
                   sql_port: 2881
                   rpc_port: 2882
               cpu_capacity: 8
           cpu_capacity_max: 8
               cpu_assigned: 2
           cpu_assigned_max: 2
               mem_capacity: 1073741824
               mem_assigned: 1073741824
         data_disk_capacity: 150403547136
           data_disk_in_use: 31457280
    data_disk_health_status: NORMAL
    data_disk_abnormal_time: 0
          log_disk_capacity: 3221225472
          log_disk_assigned: 3221225472
            log_disk_in_use: 134217728
       rpc_cert_expire_time: 2089754466000000
            rpc_tls_enabled: 1
               memory_limit: 1073741824
        data_disk_allocated: 21474836480
         data_disk_assigned: NULL
         start_service_time: 1774423270740291
                create_time: 1774423267357315
                       role: STANDBY
          switchover_status: NORMAL
         log_restore_source: 10.10.10.1:2882
                   sync_scn: 1774427027950470000
               readable_scn: 1774427027950470000
    
  1. Create a standby instance seekdb_B for the primary instance seekdb_A

    After you execute this command, an interactive deployment process starts. In the interactive deployment process, configure the information of the seekdb_B standby instance and select the deployment name of the primary instance. For more information about how to execute this command, see the Interactive deployment of seekdb section in Deploy seekdb.

    obd seekdb install --standby
    
  2. Repeat the previous operation to create a standby instance seekdb_C for the primary instance seekdb_A.

  3. View the primary-standby relationship of the seekdb instance

    Execute the following command to view the primary-standby relationship of the seekdb instance. Here, the seekdb_B instance is used as an example.

    obd seekdb display seekdb_B -g
    

    The -g parameter displays the primary-standby instance topology. The output is as follows:

    Get local repositories and plugins ok
    Open ssh connection ok
    Connect to seekdb 10.10.10.1:2881 ok
    Wait for seekdb init ok
    +--------------------------------+
    |             seekdb             |
    +---------------+---------+------+
    | ip            | version | port |
    +---------------+---------+------+
    | 10.10.10.1    | 1.2.0.0 | 2881 |
    +---------------+---------+------+
    obclient -h10.10.10.1 -P2881 -uroot -p'********' -Doceanbase -A
    
    Cluster Topology:
    
    seekdb_A
    ├── seekdb_B
    └── seekdb_C
    
  4. Verify the synchronization

    Log in to the standby instance and execute the following command to view the synchronization status.

    MySQL [(oceanbase)]> select * from __all_virtual_server_stat\G
    

    The output is as follows: For more information, see View the synchronization status of an instance in the seekdb documentation.

    *************************** 1. row ***************************
                     svr_ip: 127.0.0.1
                   svr_port: 2882
                   sql_port: 2881
                   rpc_port: 2882
               cpu_capacity: 8
           cpu_capacity_max: 8
               cpu_assigned: 2
           cpu_assigned_max: 2
               mem_capacity: 1073741824
               mem_assigned: 1073741824
         data_disk_capacity: 150403547136
           data_disk_in_use: 31457280
    data_disk_health_status: NORMAL
    data_disk_abnormal_time: 0
          log_disk_capacity: 3221225472
          log_disk_assigned: 3221225472
            log_disk_in_use: 134217728
       rpc_cert_expire_time: 2089754466000000
            rpc_tls_enabled: 1
               memory_limit: 1073741824
        data_disk_allocated: 21474836480
         data_disk_assigned: NULL
         start_service_time: 1774423270740291
                create_time: 1774423267357315
                       role: STANDBY
          switchover_status: NORMAL
         log_restore_source: 10.10.10.1:2882
                   sync_scn: 1774427027950470000
               readable_scn: 1774427027950470000
    
  1. Create a standby instance seekdb_B for the primary instance seekdb_A

    After you execute this command, an interactive deployment process starts. In the interactive deployment process, configure the information of the seekdb_B standby instance and select the deployment name of the primary instance. For more information about how to execute this command, see the Interactive deployment of seekdb section in Deploy seekdb.

    obd seekdb install --standby
    
  2. Repeat the previous operation to create a standby instance seekdb_C for the instance seekdb_B.

  3. View the primary-standby relationship of the seekdb instance

    Execute the following command to view the primary-standby relationship of the seekdb instance. Here, the seekdb_B instance is used as an example.

    obd seekdb display seekdb_B -g
    

    The -g parameter displays the primary-standby instance topology. The output is as follows:

    Get local repositories and plugins ok
    Open ssh connection ok
    Connect to seekdb 10.10.10.1:2881 ok
    Wait for seekdb init ok
    +--------------------------------+
    |             seekdb             |
    +---------------+---------+------+
    | ip            | version | port |
    +---------------+---------+------+
    | 10.10.10.1    | 1.2.0.0 | 2881 |
    +---------------+---------+------+
    obclient -h10.10.10.1 -P2881 -uroot -p'********' -Doceanbase -A
    
    Cluster Topology:
    
    seekdb_A
    └── seekdb_B
        └── seekdb_C
    
  4. Verify the synchronization

    Log in to the standby instance and execute the following command to view the synchronization status.

    MySQL [(oceanbase)]> select * from __all_virtual_server_stat\G
    

    Output:

    *************************** 1. row ***************************
                     svr_ip: 127.0.0.1
                   svr_port: 2882
                   sql_port: 2881
                   rpc_port: 2882
               cpu_capacity: 8
           cpu_capacity_max: 8
               cpu_assigned: 2
           cpu_assigned_max: 2
               mem_capacity: 1073741824
               mem_assigned: 1073741824
         data_disk_capacity: 150403547136
           data_disk_in_use: 31457280
    data_disk_health_status: NORMAL
    data_disk_abnormal_time: 0
          log_disk_capacity: 3221225472
          log_disk_assigned: 3221225472
            log_disk_in_use: 134217728
       rpc_cert_expire_time: 2089754466000000
            rpc_tls_enabled: 1
               memory_limit: 1073741824
        data_disk_allocated: 21474836480
         data_disk_assigned: NULL
         start_service_time: 1774423270740291
                create_time: 1774423267357315
                       role: STANDBY
          switchover_status: NORMAL
         log_restore_source: 10.10.10.1:2882
                   sync_scn: 1774427027950470000
               readable_scn: 1774427027950470000
    

References

  • For more information about seekdb, see seekdb documentation.

  • For more information about how to perform a primary-standby switch or decoupling by using the obd command, see Role switching and decoupling.

Previous topic

Switch the synchronization mode between primary and standby tenants
Last

Next topic

Role switching and decoupling
Next
on this page
Concepts
Prerequisites
Procedure
References