Migrate an OceanBase cluster to another IDC

2024-08-23 10:14:19  Updated

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

  1. The OceanBase cluster to be migrated is in the Running state.

  2. 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:

  1. Add zones to scale out the cluster to the A-A-A-B-B mode by using hosts in IDC B.

  2. 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.

  3. 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.

  4. Add zones to scale out the cluster to the A-B-B-B mode by using hosts in IDC B.

  5. 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.

  6. 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.

Contact Us