This topic describes how to migrate an OceanBase cluster to another IDC.
Scenarios
Scenario 1: Migrate an OceanBase cluster from IDC A to IDC B.
Scenario 2: Change from the single-IDC deployment mode, such as A-A-A, to the dual-IDC deployment mode, such as A-A-B.
Scenario 3: Change from the dual-IDC deployment mode, such as A-A-B, to the triple-IDC deployment mode, such as A-B-C.
Prerequisites
The OceanBase cluster to be migrated is in the Running state.
The host specifications of the destination IDC are sufficient to accommodate all the resource units in the zones to be migrated from the source IDC.
Procedure
The following procedure takes Scenario 1 as an example and assumes that an OceanBase cluster is deployed in IDC A in A-A-A mode and each tenant in the cluster has three replicas. To migrate the OceanBase cluster to IDC B, perform the following steps:
Add zones to scale out the cluster to the A-A-A-B-B mode by using hosts in IDC B.
Add replicas of all tenants of IDC A to the zones of IDC B. The number of tenant replicas is increased from 3 to 5.
Change the cluster into the A-B-B mode by removing any two replicas in IDC A. The number of tenant replicas is 3, with healthy replicas constituting the majority.
Add zones to scale out the cluster to the A-B-B-B mode by using hosts in IDC B.
Add replicas of all tenants of IDC A to the zones of IDC B. The number of tenant replicas is increased from 3 to 4.
Change the cluster into the B-B-B mode by removing the replica in IDC A.
Notice
Healthy replicas must constitute the majority at each step of this procedure. Otherwise, the migration fail.
Related operations
Scale out zones: For more information, see Add a zone and Create a replica.
Scale in zones: For more information, see Delete a zone and Delete a replica.