When the primary cluster becomes unavailable, you can switch a standby cluster to the primary role in OceanBase Cloud Platform (OCP) to provide services.
Considerations
A lossy failover must be performed in OCP and a lossless failover must be performed in a command-line tool. For more information about the operation, see Perform a lossless failover.
Prerequisites
Before you perform a failover, the following conditions must be met:
You can perform a failover on the standby cluster in OCP and the OCP version is V3.1.0 or later.
The primary cluster of the current cluster is stopped or unavailable.
Procedure
Log on to the OCP console.
In the left-side navigation pane, click Clusters.
Find the target standby cluster from the clusters list and click the name of the target standby cluster to go to the Overview page of the standby cluster.
Click the ... icon in the upper right corner of the page and select Switch to Primary Cluster: Disaster Recovery.
Click Switching Disaster Recovery in the dialog box that appears.
Return to the homepage. In the left-side navigation pane, choose System Management > Tasks to check the task progress. If an error occurs during the disaster recovery, an alert is generated. Troubleshoot the error based on the alert message.
Note
After the disaster recovery is successful, the original primary cluster is not switched to a standby cluster. Instead, it becomes an independent and obsolete cluster. We recommend that you delete this cluster in OCP. For more information about the operation of deleting a standby cluster, see Delete a standby cluster.
After the disaster recovery is successful, other standby clusters of the original primary cluster cannot synchronize data with the new primary cluster. We recommend that you delete the standby clusters in OCP. For more information about the operation of deleting a standby cluster, see Delete a standby cluster.