This topic describes how to perform an immediate backup of a tenant.
You can perform a tenant backup through the following two methods:
Method 1: Log in to the OCP console, choose Backup & Recovery > Backups on the tab that appears, and select Back up Now from the drop-down list in the upper-right corner of the page. On the dialog box that appears, select Back up Tenant.
Method 2: Log in to the OCP console, go to the Overview page of the target tenant, and select Backup & Recovery in the left-side navigation pane. On the dialog box that appears, click Back up Now.
Prerequisites
If you want to back up a tenant immediately by using Method 1, make sure that the user who is logged in to OCP has the following permissions:
- The Cluster Maintenance or Tenant Maintenance resource permission.
- The Backup menu permission under Backup & Recovery.
If you want to back up a tenant immediately by using Method 2, make sure that the user who is logged in to OCP has the following permissions:
- The Cluster Maintenance or Tenant Maintenance resource permission.
- The Backup & Recovery menu permission.
OceanBase Database supports tenant backup only for tenants of OceanBase Database V3.2.2-20220304134610 and later.
OceanBase Database does not support backing up a locked tenant.
Procedure
The following steps use Method 1 as an example.
Log in to the OCP console.
In the left-side navigation pane, choose Backup & Recovery > Backups. In the upper-right corner of the page, select Back up Now.
Select the backup object.
In the Back Up Tenant drop-down list, select the object to be backed up. The system automatically identifies the OceanBase version and Backup Method of the tenant and automatically fills in the Storage Configuration.
Fill in the storage configuration.
If the tenant to be backed up has a backup strategy, the storage configuration will be automatically filled in.
If the tenant to be backed up does not have a backup strategy, you need to manually fill in the storage configuration. You can fill in the information as prompted on the page, or follow Step 4 in Create a tenant-level backup strategy.
After you fill in the information, click Test to test the storage configuration.
(Optional) Enable the custom backup scope feature.
Notice
- Currently, OceanBase Database of the following versions support the custom backup scope feature: [4.2.1.11, 4.2.0) and [4.2.5.2, 4.3.0).
- If a tenant-level backup strategy exists, the custom backup scope feature is unavailable for the immediate backup.
- Data backup reads backup data from the follower replica by default, and log backup reads backup data from the leader replica by default.
- When you select the zones to be backed up, you must prioritize the zones. Otherwise, the backup may fail or generate cross-region traffic.
- When you enable the custom backup scope feature, we recommend that you do not set the primary zone to random.
Select the data backup type: zone, region, or IDC, and use the shuttle box to set the priority of the zones, regions, or IDCs.
Select the log backup type: zone, region, or IDC, and use the shuttle box to set the priority of the zones, regions, or IDCs.
Select the data backup method.
If you choose physical backup, you need to select the data backup method. If you choose logical backup, you can only choose full backup.
Notice
- Before incremental backup, you must perform a full data backup when you choose physical backup. Otherwise, the
Check if ready to data backupstep will report an error indicating that a full data backup is needed before incremental data backup. - If the
Start cluster compact if necessarystep reports an error indicating that a cluster compaction is needed before full data backup when you choose full backup, you can try to perform a major compaction and then click the Retry button to continue the backup. For more information, see Perform a major compaction.
- Before incremental backup, you must perform a full data backup when you choose physical backup. Otherwise, the
Click Back up Now.