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

Kubernetes operator for OceanBase

V2.3.1Community Edition
  • Overview
  • Quick start
  • Deploy
  • Upgrade
  • Configure
  • User guide
    • Cluster management
      • Manage clusters
      • Create a cluster
      • Zone management
        • Add zones to a cluster
        • Delete zones from a cluster
      • Server management
        • Add OBServer nodes to zones
        • Delete OBServer nodes from zones
      • Upgrade a cluster
      • Manage parameters
      • Update resources
      • Delete a cluster
    • Tenant management
      • Manage tenants
      • Create a tenant
      • Modify tenant
        • Manage resources
        • Manage replicas
        • Modify other parameters
      • Delete a tenant
      • Perform tenant O&M operations
    • High availability
      • High availability
      • Recover from node failure
      • Back up a tenant
      • Restore data from a backup
      • Physical standby tenant
      • Inter K8s cluster management
  • Appendix
    • Deploy OceanBase Database and web app in a Kubernetes cluster
    • FAQ
  • Changelog

Download PDF

Document Feedback
  1. Documentation Center
  2. Kubernetes operator for OceanBase
  3. V2.3.1

Physical standby tenant

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

Modify the configuration file
Combined use of parameters
Tenant upgrade and switchover

Explain

Physical standby tenant is available in ob-operator 2.1.0 and later versions.

This topic describes the physical standby tenant feature. This feature is available in OceanBase Database V4.x and provides your key applications with important capabilities such as high availability, data protection, and disaster recovery. It requires OBTenant and OBTenantOperation resources. You can use OBTenant resources to define tenants and OBTenantOperation resources to define tenant O&M operations. You can create a physical standby tenant from backup data or by creating an empty tenant. The physical standby tenant feature is closely related to the data restore feature.

Modify the configuration file

Parameters of a physical standby tenant are also contained in the OBTenant resource. For more information, see Restore data from a backup.

apiVersion: oceanbase.oceanbase.com/v1alpha1  
kind: OBTenant  
metadata:  
  name: t1s
  # namespace: oceanbase
spec:
  obcluster: obcluster
  tenantName: t1s
  unitNum: 1
  tenantRole: STANDBY
  source:
    restore:
      bakDataSource:
        # type: "NFS"
        # path: "t1/dataBackup"
        type: "OSS"
        path: "oss://bucket/backup?host=oss-cn-hangzhou.aliyuncs.com"
        ossAccessSecret: "oss-access"
      archiveSource:
        # type: "NFS"
        # path: "t1/logArchive"
        type: "OSS"
        path: "oss://bucket/archive?host=oss-cn-hangzhou.aliyuncs.com"
        ossAccessSecret: "oss-access"
      until:
        unlimited: true
      replayLogUntil:
        unlimited: true
    tenant: t1
  fields: values

The parameters are described as follows:

  • tenantRole: the role of the tenant. If you want to use the tenant as a standby tenant, set this parameter to STANDBY. The default value is PRIMARY.
  • source: the source of tenant data.
    • restore: the source of the backup data for restore.
    • tenant: the name of the primary tenant whose data will be synchronized to the created tenant.

Combined use of parameters

In the spec.source section of the configuration file of the OBTenant resource, the restore parameter specifies the information of the data restore source and the tenant parameter specifies the name of the primary tenant. The behavior of ob-operator varies based on the configuration of the two parameters.

  • If you specify both the restore and tenant parameters, ob-operator restores the standby tenant based on the configuration of the restore parameter, sets the log restore source of the standby tenant to the primary tenant, and replay the logs based on the values of the until and replayLogUntil parameters.
  • If you specify only the restore parameter, ob-operator restores the tenant based on the configuration of the restore parameter, and sets the tenant role as specified by the tenantRole parameter.
  • If you specify only the tenant parameter, ob-operator checks the existence of the specified tenant and the integrity of the log streams. If the check is passed, ob-operator creates an empty standby tenant and synchronizes the data from the specified primary tenant to the standby tenant.
  • If you specify neither the restore nor tenant parameter, the configuration file cannot be verified and cannot be applied to the cluster.

Tenant upgrade and switchover

For more information, see Perform tenant O&M operations.

Previous topic

Restore data from a backup
Last

Next topic

Inter K8s cluster management
Next
on this page
Modify the configuration file
Combined use of parameters
Tenant upgrade and switchover