Meet OceanBase AI Database, the unified database for operational data, real-time analytics, and AI. Explore ->

Meet OceanBase AI Database, the unified database for operational data, real-time analytics, and AI. Explore ->

OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

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

What is obdInstall obdQuick deployment of OceanBase DatabaseQuickly deploy OCPQuick deployment commandsCluster commandsCommand groupsImage and repository commandsTest command groupsTool commandsobdiag commandsBinlog service commandsHardware commandsLicense commandsPassword commandsTelemetry commandsUsage overviewOverviewPattern configuration rulesDeploy an OceanBase clusterDeploy OCPDeploy OMSChange componentsUpgrade OCPUpgrade OMSConfiguration fileUpgrade obdFAQError codesVersion rulesOceanBase Deploy V4.3.0OceanBase Deployment Tool V4.2.0OceanBase Deployer V4.1.0OceanBase Deployer V4.0.0OceanBase Deployer V3.6.0OceanBase Deployer V3.5.0OceanBase Deployer V3.4.0OceanBase Deployer V3.3.0OceanBase Deployer V3.2.2OceanBase Deployer V3.2.1OceanBase Deployer V3.2.0OceanBase Deployer V3.1.2OceanBase Deployer V3.1.1OceanBase Deployer V3.1.0OceanBase Deployer V3.0.1OceanBase Deployer V3.0.0OceanBase Deployer V2.10.1OceanBase Deployer V2.10.0OceanBase Deployer V2.9.2OceanBase Deployer V2.9.1OceanBase Deployer V2.9.0OceanBase Deployment Tool V2.8.0OceanBase Deployment Tool V2.7.0OceanBase Deployment Tool V2.6.2OceanBase Deployment Tool V2.6.1OceanBase Deployment Tool V2.6.0OceanBase Deployer V2.5.0OceanBase Deployer V2.4.0OceanBase Deployment Tool V2.3.1OceanBase Deployer V2.3.0OceanBase Deployment Tool V2.2.0OceanBase Deployer V2.1.1OceanBase Deployment Tool V2.1.0OceanBase Deployment Tool V2.0.1OceanBase Deployment Tool V2.0.0OceanBase Deployer V1.6.2OceanBase Deployer V1.6.1OceanBase Deployer V1.6.0OceanBase Deployer V1.5.0OceanBase Deployer V1.4.0OceanBase Deployer V1.3.3OceanBase Deployer V1.3.2OceanBase Deployer V1.3.0OceanBase Deployer V1.2.1OceanBase Deployer V1.2.0Interactive deployment of OceanBase Database Community EditionDeploy a Community Edition cluster using the obd graphical interfaceDeploy a Community Edition cluster by using an obd configuration file
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogWhite PaperLive DemosTraining & CertificationTicket
Company
About OceanBaseTrust CenterLegalPartnerContact Us
Follow Us

© OceanBase 2026. All rights reserved

Cloud Service AgreementPrivacy PolicySecurity
Contact Us
Document Feedback
  1. Documentation Center
  2. OceanBase Deployer
  3. V4.3.0
iconOceanBase Deployer
V 4.3.0Community Edition
Databases
  • OceanBase Database
  • OceanBase Cloud
  • OceanBase Tugraph
  • Interactive Tutorials
  • OceanBase Best Practices
Tools
  • OceanBase Cloud Platform
  • OceanBase Migration Service
  • OceanBase Developer Center
  • OceanBase Migration Assessment
  • OceanBase Admin Tool
  • OceanBase Loader and Dumper
  • OceanBase Deployer
  • Kubernetes operator for OceanBase
  • OceanBase Diagnostic Tool
  • OceanBase Binlog Service
Connectors and Middleware
  • OceanBase Database Proxy
  • Embedded SQL in C for OceanBase
  • OceanBase Call Interface
  • OceanBase Connector/C
  • OceanBase Connector/J
  • OceanBase Connector/ODBC
  • OceanBase Connector/NET
Community Edition
  • V 4.3.0
  • V 3.2.1
  • V 3.2.0
  • V 3.1.0
  • V 3.0.0
  • V 2.10.1
  • V 2.10.0
  • V 2.9.0
  • V 2.8.0
  • V 2.7.0
  • V 2.6.0
  • V 2.5.0
  • V 2.4.0
  • V 2.3.1
  • V 2.3.0
  • V 2.2.0
  • V 2.1.0
  • V 2.0.0
  • V 1.6.1

Create a standby tenant

Last Updated:2026-06-30 14:40:58  Updated
Share
What is on this page
Concepts
FAQ
Error occurs when you create a standby tenant: primary cluster have not full log xxx
References

folded

Share

This topic describes how to use obd to create a standby tenant in three scenarios.

Applicability

obd can be used to create a standby tenant only for a MySQL tenant.

Concepts

A physical standby database is an important component of the high availability solution of OceanBase Database. It provides high availability, data protection, and disaster recovery capabilities for your critical applications.

A physical standby database serves as a near-real-time hot backup of the production database of OceanBase Database. When the primary database is unavailable due to scheduled or unscheduled (majority replica failure) reasons, the standby database can take over the service to minimize downtime and reduce potential data loss.

Create a standby tenant based on the network
Create a standby tenant based on archive

Prerequisites

  • The primary and standby tenants are created in the same cluster. The version of OceanBase Database is V4.2.0 or later.

  • The primary tenant is a user tenant with complete logs.

    Execute the SELECT LS_ID, BEGIN_LSN FROM oceanbase.GV$OB_LOG_STAT WHERE ROLE = 'LEADER' ; command to check the log status. If the BEGIN_LSN value is 0, it indicates that the current log stream replica has complete logs since its creation.

  • The primary and standby tenants are in the running state.

    Execute the obd cluster display command to check the cluster status.

  • For a simple experience, the primary tenant requires at least 1C2GB memory and 4GB log disk space. For long-term use, it is recommended to allocate 1C4GB memory or more.

  • The primary and standby tenants must be managed by the same obd. If not, follow the steps in Take over a cluster using obd to take over the cluster.

Procedure

This section describes the operation of creating a standby tenant based on the network in three scenarios:

  • Scenario 1: One primary and one standby

    In this scenario, two clusters, clusterA and clusterB, are deployed. A primary tenant A_a is created in clusterA, and a standby tenant B_a is created in clusterB.

  • Scenario 2: One primary and two standbys

    In this scenario, three clusters, clusterA, clusterB, and clusterC, are deployed. A primary tenant A_a is created in clusterA, and two standby tenants, B_a and C_a, are created in clusterB and clusterC respectively.

  • Scenario 3: Cascading primary and standby

    In this scenario, three clusters, clusterA, clusterB, and clusterC, are deployed. A primary tenant A_a is created in clusterA, a standby tenant B_a is created in clusterB, and a standby tenant C_a is created in clusterC.

    Scenario 1: One primary and one standby
    Scenario 2: One primary and two standbys
    Scenario 3: Cascading primary and standby
    1. Execute the following command to create a standby tenant B_a for the primary tenant A_a.

      obd cluster tenant create-standby clusterB clusterA A_a -t B_a --tenant-root-password=*****
      
    2. Execute the following command to view the primary-standby relationship of the standby tenant.

      obd cluster tenant show clusterB -t B_a -g
      

      The -g parameter displays the primary-standby relationships of clusters. The output is as follows:

      +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                                    tenant basic info                                                                                    |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
      | tenant_name | tenant_type | compatibility_mode | primary_zone | max_cpu | min_cpu | memory_size | max_iops            | min_iops            | log_disk_size | iops_weight | tenant_role |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
      | B_a         | USER        | MYSQL              | RANDOM       | 2.0     | 2.0     | 4G          | 10000               | 10000               | 5G            | 2           | STANDBY     |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
      +-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                   standby tenant standby info                                                                   |
      +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
      | standby_tenant_name | tenant_status | sync_status | sync_scn_timestamp         | err_code | error_comment | switchover_status | switchover_epoch | log_mode     |
      +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
      | B_a                 | NORMAL        | NORMAL      | 2023-09-14 08:58:44.173462 | 0        |               | NORMAL            | 0                | NOARCHIVELOG |
      +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
      +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                                   standby tenant`s primary info                                                                                   |
      +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | standby_tenant_name | primary_tenant_info                                                                                                                                                         |
      +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | B_a                 | IP_LIST=10.10.10.1:2881;10.10.10.2:2881;10.10.10.3:2881,USER=standbyro@A_a,PASSWORD=******,TENANT_ID=1002,CLUSTER_ID=1694680744,COMPATIBILITY_MODE=MYSQL,IS_ENCRYPTED=false |
      +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      query primary-standby relation ok
      
      primary-standby relation topology graph
      
      clusterA:A_a
      └── clusterB:B_a
      

      If the values of tenant_status and sync_status are both NORMAL, the standby tenant is created successfully and the log transmission is normal. The following table describes the modules in the output.

      • tenant base info: This table displays the tenant information in the cluster. You need to pay attention to the following items.

        Column name
        Description
        tenant_name The name of the tenant.
        tenant_type The type of the tenant. Valid values: SYS and USER.
        compatibility_mode The compatibility mode of the tenant. Valid values: MySQL and Oracle. The community edition supports only the MySQL compatibility mode.
        primary_zone The primary zone of the tenant.
        tenant_role The role of the tenant. Valid values:
        • PRIMARY: primary tenant
        • STANDBY: standby tenant
        • RESTORE: tenant is being restored
      • standby tenant standby info: This table displays the specific information of the standby tenant in the cluster. You need to pay attention to the following items.

        Column name
        Description
        standby_tenant_name The name of the standby tenant.
        tenant_status The status of the standby tenant. If the value is NORMAL, the standby tenant is in the normal state.
        sync_status The log synchronization status of the standby tenant. If the value is NORMAL, the log synchronization status is normal.
        sync_scn_timestamp The log synchronization point.
        err_code The error code of the log synchronization.
        error_comment The error information of the log synchronization.
        switchover_status The primary-standby tenant switchover status. If the value is NORMAL, the primary-standby tenant switchover status is normal.
        switchover_epoch The primary-standby tenant switchover time.
        log_mode The log archiving mode. For primary-standby tenants based on the network, the log archiving mode is NOARCHIVELOG.
      • standby tenant`s primary info: This table displays the information of the primary tenant of the standby tenant in the cluster. You need to pay attention to the following items.

        Column name
        Description
        standby_tenant_name The name of the standby tenant. This parameter is used to identify the primary tenant of the standby tenant.
        primary_tenant_info The information of the primary tenant of the standby tenant. The information includes the IP address of the node where the primary tenant is located, the name of the primary tenant, the password of the standby user, the ID of the primary tenant, and the ID of the cluster where the primary tenant is located.
    3. Connect to the primary and standby tenants separately, modify the information in the primary tenant (A_a), and check whether the information is synchronized in the standby tenant (B_a).

    1. Execute the following command to create a standby tenant B_a for the primary tenant A_a.

      obd cluster tenant create-standby clusterB clusterA A_a -t B_a --tenant-root-password=*****
      
    2. Execute the following command to create a standby tenant C_a for the primary tenant A_a.

      obd cluster tenant create-standby clusterC clusterA A_a -t C_a --tenant-root-password=*****
      
    3. Execute the following command to view the primary-standby relationship of the standby tenant. Here, the clusterB cluster is used as an example.

      obd cluster tenant show clusterB -t B_a -g
      

      The -g parameter displays the primary-standby relationships of clusters. The output is as follows:

      +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                                    tenant basic info                                                                                    |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
      | tenant_name | tenant_type | compatibility_mode | primary_zone | max_cpu | min_cpu | memory_size | max_iops            | min_iops            | log_disk_size | iops_weight | tenant_role |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
      | B_a         | USER        | MYSQL              | RANDOM       | 2.0     | 2.0     | 4G          | 10000               | 10000               | 5G            | 2           | STANDBY     |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
      +-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                   standby tenant standby info                                                                   |
      +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
      | standby_tenant_name | tenant_status | sync_status | sync_scn_timestamp         | err_code | error_comment | switchover_status | switchover_epoch | log_mode     |
      +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
      | B_a                 | NORMAL        | NORMAL      | 2023-09-14 09:12:13.819821 | 0        |               | NORMAL            | 0                | NOARCHIVELOG |
      +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
      +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                                   standby tenant`s primary info                                                                                   |
      +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | standby_tenant_name | primary_tenant_info                                                                                                                                                         |
      +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | B_a                 | IP_LIST=10.10.10.1:2881;10.10.10.2:2881;10.10.10.3:2881,USER=standbyro@A_a,PASSWORD=******,TENANT_ID=1002,CLUSTER_ID=1694680744,COMPATIBILITY_MODE=MYSQL,IS_ENCRYPTED=false |
      +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      query primary-standby relation ok
      
      primary-standby relation topology graph
      
      clusterA:A_a
      ├── clusterB:B_a
      └── clusterC:C_a
      

      If the values of tenant_status and sync_status are both NORMAL, the standby tenant is created successfully and the log transmission is normal. For more information about the modules in the output, see Scenario 1: One primary and one standby.

    4. Connect to the primary and standby tenants separately, modify the information in the primary tenant (A_a), and check whether the information is synchronized in the standby tenants (B_a and C_a).

    1. Execute the following command to create a standby tenant B_a for the primary tenant A_a.

      obd cluster tenant create-standby clusterB clusterA A_a -t B_a --tenant-root-password=*****
      
    2. Execute the following command to check whether the standby tenant B_a is created.

      obd cluster tenant show clusterB -t B_a -g
      

      If the values of tenant_status and sync_status are both NORMAL, the standby tenant is created successfully and the log transmission is normal. For more information about the modules in the output, see Scenario 1: One primary and one standby.

      The -g parameter displays the primary-standby relationships of clusters. The output is as follows:

      +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                                    tenant basic info                                                                                    |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
      | tenant_name | tenant_type | compatibility_mode | primary_zone | max_cpu | min_cpu | memory_size | max_iops            | min_iops            | log_disk_size | iops_weight | tenant_role |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
      | B_a         | USER        | MYSQL              | RANDOM       | 2.0     | 2.0     | 4G          | 10000               | 10000               | 5G            | 2           | STANDBY     |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
      +-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                   standby tenant standby info                                                                   |
      +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
      | standby_tenant_name | tenant_status | sync_status | sync_scn_timestamp         | err_code | error_comment | switchover_status | switchover_epoch | log_mode     |
      +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
      | B_a                 | NORMAL        | NORMAL      | 2023-09-14 08:58:44.173462 | 0        |               | NORMAL            | 0                | NOARCHIVELOG |
      +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
      +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                                   standby tenant`s primary info                                                                                   |
      +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | standby_tenant_name | primary_tenant_info                                                                                                                                                         |
      +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | B_a                 | IP_LIST=10.10.10.1:2881;10.10.10.2:2881;10.10.10.3:2881,USER=standbyro@A_a,PASSWORD=******,TENANT_ID=1002,CLUSTER_ID=1694680744,COMPATIBILITY_MODE=MYSQL,IS_ENCRYPTED=false |
      +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      query primary-standby relation ok
      
      primary-standby relation topology graph
      
      clusterA:A_a
      └── clusterB:B_a
      
    3. Execute the following command to create a standby tenant C_a for the standby tenant B_a.

      Note

      It is recommended that you create the standby tenant C_a only after the standby tenant B_a is synchronized.

      obd cluster tenant create-standby clusterC clusterB B_a -t C_a --tenant-root-password=*****
      
    4. Execute the following command to view the primary-standby relationship of the standby tenant. Here, the clusterB cluster is used as an example.

      obd cluster tenant show clusterB -t B_a -g
      

      The -g parameter displays the primary-standby relationships of clusters. The output is as follows:

      +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                                    tenant basic info                                                                                    |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
      | tenant_name | tenant_type | compatibility_mode | primary_zone | max_cpu | min_cpu | memory_size | max_iops            | min_iops            | log_disk_size | iops_weight | tenant_role |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
      | B_a         | USER        | MYSQL              | RANDOM       | 2.0     | 2.0     | 4G          | 10000               | 10000               | 5G            | 2           | STANDBY     |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+
      +-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                   standby tenant standby info                                                                   |
      +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
      | standby_tenant_name | tenant_status | sync_status | sync_scn_timestamp         | err_code | error_comment | switchover_status | switchover_epoch | log_mode     |
      +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
      | B_a                 | NORMAL        | NORMAL      | 2023-09-14 09:24:48.737141 | 0        |               | NORMAL            | 0                | NOARCHIVELOG |
      +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
      +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                                   standby tenant`s primary info                                                                                   |
      +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | standby_tenant_name | primary_tenant_info                                                                                                                                                         |
      +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | B_a                 | IP_LIST=10.10.10.1:2881;10.10.10.2:2881;10.10.10.3:2881,USER=standbyro@A_a,PASSWORD=******,TENANT_ID=1002,CLUSTER_ID=1694680744,COMPATIBILITY_MODE=MYSQL,IS_ENCRYPTED=false |
      +---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      query primary-standby relation ok
      
      primary-standby relation topology graph
      
      clusterA:A_a
      └── clusterB:B_a
          └── clusterC:C_a
      
    5. Connect to the primary and standby tenants separately, modify the information in the primary tenant (A_a), and check whether the information is synchronized in the standby tenant (B_a) and the standby tenant of the standby tenant (C_a).

Prerequisites

  • The primary and standby clusters have been created, and the OceanBase Database version is the same and is V4.2.0 or later.

  • The primary tenant must be a user tenant, and the backup must be completed. For more information about how to back up a tenant, see Tenant backup in Backup and restore.

  • The primary and standby clusters must be running. You can run the obd cluster display command to view the cluster status.

  • For a simple experience, the primary tenant must have at least 1C2GB of memory and 4GB of log disk space. For long-term use, the primary tenant must have at least 1C4GB of memory.

  • The primary and standby clusters must be managed by the same obd. If the cluster is not managed by obd, you can refer to Use obd to takeover a cluster to take over the cluster.

  • The primary and standby clusters must be able to access shared storage (such as OSS or NFS).

Procedure

This section describes how to create a standby tenant based on an archive in three different scenarios:

  • Scenario 1: One primary and one standby

    In this scenario, two clusters, clusterA and clusterB, are deployed. A primary tenant A_a is created in clusterA, and a standby tenant B_a is created in clusterB.

  • Scenario 2: One primary and two standbys

    In this scenario, three clusters, clusterA, clusterB, and clusterC, are deployed. A primary tenant A_a is created in clusterA, and two standby tenants, B_a and C_a, are created in clusterB and clusterC, respectively.

  • Scenario 3: Cascading primary and standby

    In this scenario, three clusters, clusterA, clusterB, and clusterC, are deployed. A primary tenant A_a is created in clusterA. A standby tenant B_a is created in clusterB, and a standby tenant C_a is created in clusterC.

    Notice

    In the cascading primary and standby scenario, after you create a standby tenant B_a based on an archive for the primary tenant A_a, you cannot create a standby tenant C_a for the standby tenant B_a based on the network.

    Scenario 1: One primary and one standby
    Scenario 2: One primary and two standbys
    Scenario 3: Cascading primary and standby
    1. Run the following command to create a standby tenant B_a for the primary tenant A_a.

      obd cluster tenant create-standby clusterB clusterA A_a --type=LOCATION -t B_a -d 'oss://oceanbase-test-bucket/backup/data?host=****.aliyun-inc.com&access_id=****&access_key=****&delete_mode=delete&checksum_type=md5' -a 'oss://oceanbase-test-bucket/backup/log?host=****.aliyun-inc.com&access_id=****&access_key=****&delete_mode=delete&checksum_type=md5'
      

      In this example, OSS is used as the backup medium. You need to replace the backup file path with the actual path.

    2. Run the following command to view the status of the standby tenant.

      obd cluster tenant show clusterB -t B_a -g
      

      The -g parameter displays the primary-standby relationship in a graph. The output is as follows:

      +-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                         tenant basic info                                                                         |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+----------+----------+---------------+-------------+-------------+
      | tenant_name | tenant_type | compatibility_mode | primary_zone | max_cpu | min_cpu | memory_size | max_iops | min_iops | log_disk_size | iops_weight | tenant_role |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+----------+----------+---------------+-------------+-------------+
      | B_a         | USER        | MYSQL              | RANDOM       | 2.0     | 2.0     | 4G          | 10000    | 10000    | 5G            | 2           | STANDBY     |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+----------+----------+---------------+-------------+-------------+
      +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                                                 standby tenant standby info                                                                                                  |
      +---------------------+---------------+-----------------+----------------------------+----------+------------------------------------------------------------------------+-------------------+------------------+--------------+
      | standby_tenant_name | tenant_status | sync_status     | sync_scn_timestamp         | err_code | error_comment                                                          | switchover_status | switchover_epoch | log_mode     |
      +---------------------+---------------+-----------------+----------------------------+----------+------------------------------------------------------------------------+-------------------+------------------+--------------+
      | B_a                 | NORMAL        | RESTORE SUSPEND | 2025-05-27 16:12:08.556291 | 0        | Restore suspend, the log stream has synchronized to recovery until scn | NORMAL            | 0                | NOARCHIVELOG |
      +---------------------+---------------+-----------------+----------------------------+----------+------------------------------------------------------------------------+-------------------+------------------+--------------+
      +----------------------------------------------------------------------------------------------------------------------+
      |           standby tenant`s primary info                                                                              |
      +---------------------+------------------------------------------------------------------------------------------------+
      | standby_tenant_name | primary_tenant_info                                                                            |
      +---------------------+------------------------------------------------------------------------------------------------+
      | B_a                 | oss://oceanbase-test-bucket/backup/log?host=****.aliyun-inc.com&access_id=****&access_key=**** |
      +---------------------+------------------------------------------------------------------------------------------------+
      query primary-standby relation ok
      
      primary-standby relation topology graph
      
      clusterA:A_a
      └── clusterB:B_a
      

      The tenant_status value is NORMAL, and the sync_status value is RESTORE SUSPEND. This indicates that the standby tenant is created and the logs are synchronized to the archive. The following table describes the modules in the output.

      • tenant base info: This table displays the tenant information in the cluster. You need to pay attention to the following items.

        Column name
        Description
        tenant_name The name of the tenant.
        tenant_type The type of the tenant. Valid values: SYS and USER.
        compatibility_mode The compatibility mode of the tenant. Valid values: MySQL and Oracle. Only the MySQL mode is supported in the Community Edition.
        primary_zone The primary zone of the tenant.
        tenant_role The role of the tenant. Valid values:
        • PRIMARY: primary tenant
        • STANDBY: standby tenant
        • RESTORE: tenant is being restored
      • standby tenant standby info: This table displays the specific information of the standby tenant in the cluster. You need to pay attention to the following items.

        Column name
        Description
        standby_tenant_name The name of the standby tenant.
        tenant_status The status of the standby tenant. If the value is NORMAL, the standby tenant is in normal status.
        sync_status The log synchronization status of the standby tenant. If the value is RESTORE SUSPEND, the logs are synchronized to the archive. After you enable continuous log synchronization for the standby tenant, the value of this column changes to NORMAL, indicating that the log synchronization is normal.
        sync_scn_timestamp The log synchronization point.
        err_code The error code of log synchronization.
        error_comment The error information of log synchronization.
        switchover_status The primary-standby tenant switchover status. If the value is NORMAL, the primary-standby tenant switchover status is normal.
        switchover_epoch The time when the primary-standby tenant switchover occurs.
        log_mode The log archive mode.
        • ARCHIVELOG: archive mode is enabled.
        • NOARCHIVELOG: archive mode is not enabled.
      • standby tenant`s primary info: This table displays the primary tenant information of the standby tenant in the cluster. You need to pay attention to the following items.

        Column name
        Description
        standby_tenant_name The name of the standby tenant. This column is used to indicate which standby tenant the primary tenant information belongs to.
        primary_tenant_info The primary tenant information of the standby tenant. When you create a standby tenant based on an archive, this column displays the log archive directory path.
    3. Enable continuous log synchronization

      After you create a standby tenant based on an archive, the standby tenant does not continuously synchronize the logs of the primary tenant. Therefore, after the standby tenant is created (the tenant_status value of the obd cluster tenant show command is NORMAL, and the sync_status value is RESTORE SUSPEND), you need to manually run the following command to enable continuous log synchronization for the standby tenant.

      obd cluster tenant recover clusterB B_a 
      
    4. Connect to the primary and standby tenants, modify the information in the primary tenant (A_a), and check whether the standby tenant (B_a) is updated.

    1. Run the following command to create a standby tenant B_a for the primary tenant A_a.

      obd cluster tenant create-standby clusterB clusterA A_a --type=LOCATION -t B_a --tenant-root-password=***** -d 'oss://oceanbase-test-bucket/backup/data?host=****.aliyun-inc.com&access_id=****&access_key=****&delete_mode=delete&checksum_type=md5' -a 'oss://oceanbase-test-bucket/backup/log?host=****.aliyun-inc.com&access_id=****&access_key=****&delete_mode=delete&checksum_type=md5'
      
    2. Enable continuous log synchronization

      After you create a standby tenant based on an archive, the standby tenant does not continuously synchronize the logs of the primary tenant. Therefore, after the standby tenant is created (the tenant_status value of the obd cluster tenant show command is NORMAL, and the sync_status value is RESTORE SUSPEND), you need to manually run the following command to enable continuous log synchronization for the standby tenant.

      obd cluster tenant recover clusterB B_a 
      
    3. Run the following command to create a standby tenant C_a for the primary tenant A_a.

      obd cluster tenant create-standby clusterC clusterA A_a --type=LOCATION -t C_a --tenant-root-password=***** -d 'oss://oceanbase-test-bucket/backup/data?host=****.aliyun-inc.com&access_id=****&access_key=****&delete_mode=delete&checksum_type=md5' -a 'oss://oceanbase-test-bucket/backup/log?host=****.aliyun-inc.com&access_id=****&access_key=****&delete_mode=delete&checksum_type=md5'
      
    4. Enable continuous log synchronization

      After you create a standby tenant based on an archive, the standby tenant does not continuously synchronize the logs of the source tenant (the primary tenant or another standby tenant). Therefore, after the standby tenant is created (the tenant_status value of the obd cluster tenant show command is NORMAL, and the sync_status value is RESTORE SUSPEND), you need to manually run the following command to enable continuous log synchronization for the standby tenant.

      obd cluster tenant recover clusterC C_a 
      
    5. Run the following command to view the primary-standby relationship of the standby tenants. In this example, the primary-standby relationship of the clusterB cluster is viewed.

      obd cluster tenant show clusterB -t B_a -g
      

      The -g parameter displays the primary-standby relationship in a graph. The output is as follows:

      +-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                         tenant basic info                                                                         |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+----------+----------+---------------+-------------+-------------+
      | tenant_name | tenant_type | compatibility_mode | primary_zone | max_cpu | min_cpu | memory_size | max_iops | min_iops | log_disk_size | iops_weight | tenant_role |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+----------+----------+---------------+-------------+-------------+
      | B_a         | USER        | MYSQL              | RANDOM       | 2.0     | 2.0     | 4G          | 10000    | 10000    | 5G            | 2           | STANDBY     |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+----------+----------+---------------+-------------+-------------+
      +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
      | standby_tenant_name | tenant_status | sync_status | sync_scn_timestamp         | err_code | error_comment | switchover_status | switchover_epoch | log_mode     |
      +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
      | B_a                 | NORMAL        | NORMAL      | 2025-05-27 16:33:28.155249 | 0        |               | NORMAL            | 0                | NOARCHIVELOG |
      +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
      +----------------------------------------------------------------------------------------------------------------------+
      |           standby tenant`s primary info                                                                              |
      +---------------------+------------------------------------------------------------------------------------------------+
      | standby_tenant_name | primary_tenant_info                                                                            |
      +---------------------+------------------------------------------------------------------------------------------------+
      | B_a                 | oss://oceanbase-test-bucket/backup/log?host=****.aliyun-inc.com&access_id=****&access_key=**** |
      +---------------------+------------------------------------------------------------------------------------------------+
      query primary-standby relation ok
      
      primary-standby relation topology graph
      
      clusterA:A_a
      ├── clusterB:B_a
      └── clusterC:C_a
      

      When the tenant_status and sync_status values in the output are both NORMAL, the standby tenant is created successfully and the log transmission is normal. For more information about the modules in the output, see Scenario 1: One primary and one standby.

    6. Connect to the primary and standby tenants separately. Modify the information in the primary tenant (A_a), and check whether the standby tenants (B_a and C_a) are updated.

    1. Run the following command to create a standby tenant B_a for the A_a tenant:

      obd cluster tenant create-standby clusterB clusterA A_a --type=LOCATION -t B_a --tenant-root-password=***** -d 'oss://oceanbase-test-bucket/backup/data?host=****.aliyun-inc.com&access_id=****&access_key=****&delete_mode=delete&checksum_type=md5' -a 'oss://oceanbase-test-bucket/backup/log?host=****.aliyun-inc.com&access_id=****&access_key=****&delete_mode=delete&checksum_type=md5'
      
    2. Run the following command to view the status of the standby tenant:

      obd cluster tenant show clusterB -t B_a -g
      

      When the tenant_status value is NORMAL and the sync_status value is RESTORE SUSPEND in the output, the standby tenant is created successfully and the logs are synchronized to the archive. For more information about the modules in the output, see Scenario 1: One primary and one standby.

      The -g option displays the primary/standby relationships in the cluster. The output is as follows:

      +-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                         tenant basic info                                                                         |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+----------+----------+---------------+-------------+-------------+
      | tenant_name | tenant_type | compatibility_mode | primary_zone | max_cpu | min_cpu | memory_size | max_iops | min_iops | log_disk_size | iops_weight | tenant_role |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+----------+----------+---------------+-------------+-------------+
      | B_a         | USER        | MYSQL              | RANDOM       | 2.0     | 2.0     | 4G          | 10000    | 10000    | 5G            | 2           | STANDBY     |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+----------+----------+---------------+-------------+-------------+
      +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                                                 standby tenant standby info                                                                                                  |
      +---------------------+---------------+-----------------+----------------------------+----------+------------------------------------------------------------------------+-------------------+------------------+--------------+
      | standby_tenant_name | tenant_status | sync_status     | sync_scn_timestamp         | err_code | error_comment                                                          | switchover_status | switchover_epoch | log_mode     |
      +---------------------+---------------+-----------------+----------------------------+----------+------------------------------------------------------------------------+-------------------+------------------+--------------+
      | B_a                 | NORMAL        | RESTORE SUSPEND | 2025-05-27 16:12:08.556291 | 0        | Restore suspend, the log stream has synchronized to recovery until scn | NORMAL            | 0                | NOARCHIVELOG |
      +---------------------+---------------+-----------------+----------------------------+----------+------------------------------------------------------------------------+-------------------+------------------+--------------+
      +----------------------------------------------------------------------------------------------------------------------+
      |           standby tenant`s primary info                                                                              |
      +---------------------+------------------------------------------------------------------------------------------------+
      | standby_tenant_name | primary_tenant_info                                                                            |
      +---------------------+------------------------------------------------------------------------------------------------+
      | B_a                 | oss://oceanbase-test-bucket/backup/log?host=****.aliyun-inc.com&access_id=****&access_key=**** |
      +---------------------+------------------------------------------------------------------------------------------------+
      query primary-standby relation ok
      
      primary-standby relation topology graph
      
      clusterA:A_a
      └── clusterB:B_a
      
    3. Enable continuous log synchronization.

      After a standby tenant is created based on an archive, it does not continuously synchronize logs archived by the primary tenant or another standby tenant. Therefore, after the standby tenant is created successfully (the tenant_status value is NORMAL and the sync_status value is RESTORE SUSPEND in the output of the obd cluster tenant show command), run the following command to enable continuous log synchronization for the standby tenant:

      obd cluster tenant recover clusterB B_a 
      
    4. Run the following command to create a standby tenant C_a for the B_a tenant:

      Note

      It is recommended that you create the C_a tenant after the B_a tenant is synchronized.

      obd cluster tenant create-standby clusterC clusterB B_a --type=LOCATION -t C_a --tenant-root-password=***** -d 'oss://oceanbase-test-bucket/backup/data?host=****.aliyun-inc.com&access_id=****&access_key=****&delete_mode=delete&checksum_type=md5' -a 'oss://oceanbase-test-bucket/backup/log?host=****.aliyun-inc.com&access_id=****&access_key=****&delete_mode=delete&checksum_type=md5'
      
    5. Enable continuous log synchronization.

      After a standby tenant is created based on an archive, it does not continuously synchronize logs archived by the primary tenant or another standby tenant. Therefore, after the standby tenant is created successfully (the tenant_status value is NORMAL and the sync_status value is RESTORE SUSPEND in the output of the obd cluster tenant show command), run the following command to enable continuous log synchronization for the standby tenant:

      obd cluster tenant recover clusterB B_a 
      
    6. Run the following command to view the primary/standby relationships of the standby tenant. Here is an example of viewing the primary/standby relationships in the clusterB cluster:

      obd cluster tenant show clusterB -t B_a -g
      

      The -g option displays the primary/standby relationships in the cluster. The output is as follows:

      +-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      |                                                                         tenant basic info                                                                         |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+----------+----------+---------------+-------------+-------------+
      | tenant_name | tenant_type | compatibility_mode | primary_zone | max_cpu | min_cpu | memory_size | max_iops | min_iops | log_disk_size | iops_weight | tenant_role |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+----------+----------+---------------+-------------+-------------+
      | B_a         | USER        | MYSQL              | RANDOM       | 2.0     | 2.0     | 4G          | 10000    | 10000    | 5G            | 2           | STANDBY     |
      +-------------+-------------+--------------------+--------------+---------+---------+-------------+----------+----------+---------------+-------------+-------------+
      +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
      | standby_tenant_name | tenant_status | sync_status | sync_scn_timestamp         | err_code | error_comment | switchover_status | switchover_epoch | log_mode     |
      +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
      | B_a                 | NORMAL        | NORMAL      | 2025-05-27 16:33:28.155249 | 0        |               | NORMAL            | 0                | NOARCHIVELOG |
      +---------------------+---------------+-------------+----------------------------+----------+---------------+-------------------+------------------+--------------+
      +----------------------------------------------------------------------------------------------------------------------+
      |           standby tenant`s primary info                                                                              |
      +---------------------+------------------------------------------------------------------------------------------------+
      | standby_tenant_name | primary_tenant_info                                                                            |
      +---------------------+------------------------------------------------------------------------------------------------+
      | B_a                 | oss://oceanbase-test-bucket/backup/log?host=****.aliyun-inc.com&access_id=****&access_key=**** |
      +---------------------+------------------------------------------------------------------------------------------------+
      query primary-standby relation ok
      
      primary-standby relation topology graph
      
      clusterA:A_a
      └── clusterB:B_a
          └── clusterC:C_a
      
    7. Connect to the primary and standby tenants separately. Modify the information in the primary tenant (A_a), and check whether the standby tenants (B_a and C_a) are updated.

FAQ

Error occurs when you create a standby tenant: primary cluster have not full log xxx

Cause: The primary cluster does not have full logs.

Network-based primary-standby synchronization requires the primary cluster to have full logs. Therefore, when you execute the command to create a standby tenant, obd checks whether the BEGIN_LSN value of the log stream in the primary cluster is 0. If the BEGIN_LSN value is 0, it indicates that the log stream replica has complete logs since its creation. If the BEGIN_LSN value is not 0, obd cannot create a standby tenant based on network synchronization.

Solution: Log in to the primary cluster and execute the following command to query whether the BEGIN_LSN value of the log stream is 0.

SELECT LS_ID, BEGIN_LSN FROM oceanbase.GV$OB_LOG_STAT WHERE ROLE = 'LEADER' ;

If the BEGIN_LSN value of the log stream in the primary cluster is not 0, it indicates that the primary cluster does not have full logs. In this case, you cannot use obd to create a standby tenant for the primary cluster.

References

  • For information about how to perform data backup and log archiving by using obd commands, see Backup and restore.

  • For information about how to perform primary-standby switching or decoupling by using obd commands, see Role switching and decoupling.

  • For information about how to switch the primary-standby synchronization method by using obd commands, see Switch the primary-standby tenant synchronization method.

Previous topic

Deploy oblogproxy
Last

Next topic

Role switching and decoupling
Next
What is on this page
Concepts
FAQ
Error occurs when you create a standby tenant: primary cluster have not full log xxx
References