You can create a standby tenant for an existing primary or standby tenant. OceanBase Cloud Platform (OCP) allows you to create multiple standby tenants for a single primary tenant (one-to-many), and create a standby tenant for an existing standby tenant (cascading).
You can create a standby tenant in the following ways in the OCP console:
Create a standby tenant on the Tenants page.
Create a standby tenant on the Overview page of a specified cluster.
Create a standby tenant on the Tenant Management page of a specified cluster.
Create a standby tenant on the Overview page of a tenant.
This topic describes how to create a standby tenant on the Tenants page.
Prerequisites
Primary/Standby tenants are configured in OceanBase Database V4.2 or later.
The cluster of the standby tenant is in the Running state.
You have logged on with an account that has the permissions to manage the cluster. For example, you act as the system administrator or the OCP tenant administrator.
Optional. You have created a parameter template by referring to Manage tenant parameter templates.
When you need to create multiple tenants with the same parameter configuration, you can use a parameter template to avoid repeatedly configuring the same parameters.
The following conditions are met before you enable the arbitration service for a tenant:
The arbitration service is added for the cluster to which the tenant belongs, and the service is in the RUNNING state.
The locality of the tenant includes two or four full-featured replicas.
The resources available on the server hosting the arbitration service meet the resource requirements.
You can modify the resource requirements by using the following system parameters based on your business requirements. For more information, see Modify system parameters.
ocp.arbitration.min.remain.disk.size: the minimum size in MB of the clog disk on the arbitration service host required when the arbitration service is enabled for the tenant. The parameter value is in the (a,b) format, indicating the minimum clog disk sizes required when the tenant has two and four full-featured replicas, respectively. Default value:[12,24].ocp.arbitration.max.cpu.used.percentage: the maximum CPU utilization in percentage (%) allowed on the arbitration service host when the arbitration service is enabled for the tenant. Default value:90.ocp.arbitration.max.memory.used.percentage: the maximum memory usage in percentage (%) allowed on the arbitration service host when the arbitration service is enabled for the tenant. Default value:90.
Procedure
Log on to the OCP console.
In the left-side navigation pane, click Tenants. The Tenants page appears.
Click Create Tenant in the upper-right corner.

Configure the parameters in the Basic Information section.
The required parameters and their descriptions are listed in the following table.
Parameter Description Tenant Type Select Standby Tenant. Note
When you create a standby tenant on the Overview page of a specified tenant, you cannot select a tenant type. The default value is
Standby Tenant.Cluster of Primary Tenant Select the cluster to which the primary tenant belongs. Note
When you create a standby tenant on the Overview page of a specified tenant, the current cluster is displayed by default and cannot be modified.
Primary Tenant Select the primary tenant of the standby tenant. Note
When you create a standby tenant on the Overview page of a specified tenant, the current tenant is regarded as the primary tenant by default and cannot be modified.
Cluster of Standby Tenant Select the cluster to which the standby tenant belongs. Note
When you create a standby tenant on the Tenant Management page of a specified cluster, the current cluster is displayed by default and cannot be modified.
Standby Tenant Name The name of the standby tenant. It can contain letters, digits, and underscores (_), and must be 2 to 64 characters in length. Primary/Standby Synchronization Method The synchronization mode between the primary and standby tenants. Two synchronization modes are supported: Network-based Synchronization and Archiving-based. - In network-based synchronization mode, logs are synchronized through the remote procedure call (RPC) network between OBServer nodes. A standby tenant can directly read logs from the primary tenant by using an IP address and a port number. By default, the network-based mode is used for synchronization between the primary and standby tenants.
- In archiving-based synchronization mode, logs are synchronized based on shared storage. The primary tenant writes logs to a network disk or Alibaba Cloud Object Storage Service (OSS), and the standby tenant reads data from the shared storage. To use the archiving-based synchronization mode, make sure that archiving is enabled for the current tenant. Otherwise, data cannot be synchronized based on archiving. For more information about how to enable archiving, see Back up tenant now.
Note
If a primary/standby relationship (cascading or one-to-many) already exists, the primary/standby synchronization mode that is already in use is selected by default and cannot be modified.

Specify the backup set information in the Restore Standby Tenant Settings section.
Note
If the network-based synchronization mode is used and the REDO logs of the primary tenant are complete, you do not need to configure the standby tenant restoration settings. You can also click Restore by Using Backup Set and configure backup set information to restore the standby tenant by using the backup set.
Parameter Description Independent Storage Directory You can choose whether to specify an independent storage directory for the standby tenant based on the application scenario. - If you have backed up the standby tenant by using a CLI instead of the tenant backup feature of OCP, or if you have copied the external backup files of the primary tenant to a shared storage medium and you want to restore the standby tenant by using the backup files, you can specify an independent storage directory.
- If you have backed up the standby tenant by using the tenant backup feature of OCP, you can choose not to specify an independent storage directory. In this case, the system automatically fills in the storage directory information and the information cannot be modified.
Backup Set Storage Type The type of the storage medium for backup files. Valid values: - File: indicates the local file storage system, which is generally Network File System (NFS).
- OSS: indicates Alibaba Cloud OSS, which is supported only in OceanBase Database V2.2.76 and later.
Data Backup Directory Enter the data storage directory for backup files on the current storage medium. This parameter is displayed when Independent Storage Directory is specified. Directory of Archived Logs Enter the log storage directory for backup files on the current storage medium. This parameter is displayed when Independent Storage Directory is specified. Domain Enter the domain name of the OSS bucket for storing backup files. This parameter is displayed when OSS is selected for Backup Set Storage Type. You can append a port number to the domain name. Example: oss.ap-shanghai.myqcloud.com:8080.User Enter the user for accessing the OSS bucket. This parameter is displayed when Independent Storage Directory is specified and OSS is selected for Backup Set Storage Type. Access Key Enter the AccessKey pair for accessing the OSS bucket. This parameter is displayed when Independent Storage Directory is specified and OSS is selected for Backup Set Storage Type. Backup Directory Enter the storage directory for backup files on the current backup medium. This parameter is displayed when Independent Storage Directory is not specified and File is selected for Backup Set Storage Type. Storage Directory Enter the storage directory for backup files on the current storage medium. This parameter is displayed when Independent Storage Directory is not specified and OSS is selected for Backup Set Storage Type. 
Click Backup Set Verification. The system checks the directory of the current backup set, whether the cluster of the standby tenant is accessible, and whether logs of the maximum restorable window of the current backup set and logs of the current primary tenant are consistent. If the check fails, you can locate and handle the issue based on the prompts.
Specify the information in the Standby Tenant Replica Settings section.
Note
We recommend that you keep the replica specifications of the standby tenant consistent with those of the primary tenant.
By default, the system displays configurable zones based on the zone information of the selected cluster. If you do not need to create a replica in a zone, click the Delete icon to delete the zone. The zone information parameters that need to be configured and their descriptions are listed in the following table.
Parameter Description Replica Type The type of the replica. Valid values: - Full-featured Replica
- Read-only Replica
Note
In a standalone centralized database, only full-featured replicas are supported.
Unit Specification OCP has a set of built-in unit specifications. You can select the specifications that you need from the list of unit specifications or click Add Specification at the bottom of the list to add custom specifications. For more information, see OCP resource unit specifications. Notice
- We recommend that you set the same specifications and number of units for full-featured replicas. Different specifications or numbers of units can affect performance or stability.
- If the OceanBase Database version of the cluster is V4.0.0 or later, take note of the following considerations:
- You cannot configure less than one CPU core for the tenant.
- By default, the cluster limits the minimum memory size. You can adjust the limit by modifying the
__min_full_resource_pool_memoryparameter. For example, if the version is V4.1.0, you can modify the parameter by referring to Modify cluster parameters.
Units The number of units in the zone. The number of resource units cannot exceed the number of OBServer nodes in the zone. - If the cluster version is OceanBase Database V4.0 or later, you can only set the same number of units for all zones, which is 1 by default.
- If the cluster version is earlier than OceanBase Database V4.0, you can set different numbers of units for different zones.
Note
In a standalone centralized database, the default number of units is 1, which cannot be modified.
Zone Priority Rankings Specifies whether to define priorities for the zones of the tenant. The priorities affect the priority of the primary zone of the sys tenant. - If this parameter is not specified, the zone priorities of the sys tenant are used by default.
- If Zone Priority Rankings is enabled while no zone priorities, the random priority is used.
- To configure zone priorities, you can select one or more zones from the list on the left that displays all zones in the current cluster and add the selected zones to the list on the right. By default, the priority of a zone added earlier is higher than that of a zone added later, and the zones added at the same time have the same priority. After you move the zones to the box on the right side, you can also drag them upward or downward to adjust their priority order. A zone takes priority over those beneath it.
Note
In a standalone centralized database, the zone priority rankings are not displayed, and Zone1 has the highest priority.
Enable Arbitration Service Specifies whether to enable the arbitration service for the tenant. The arbitration service is disabled by default. 
Enable Parameter Configurations and configure the tenant parameters.
You can click the button in section ① of the following figure to add startup parameters one by one and set their values.
You can also click Select Parameter Template as shown in section ② of the following figure and select a parameter template. The system will automatically populate parameters in this section by using the template.
Note
- If you are creating a tenant in MySQL mode by using a parameter template that contains parameters that are valid only in Oracle mode, you must manually delete those parameters.
- If no tenant parameter template is available, you can click Create Tenant Parameter Template to create one. For more information, see Manage tenant parameter templates.

Click Submit.
The page that appears prompts you that the tenant creation task has been submitted and displays the summary information of the task.
To view the task details, click View Task Details.
To return to the Tenants list, click Return to Tenants List. In the Tenants list, you can view the status and task details of the new tenant, and delete the tenant if the tenant creation failed.

Note
When the task status is Completed, you can check the status of the new tenant in the Tenants list on the Tenant Management page. The new tenant is created if its status is Running.