A cluster-level backup strategy takes effect only for tenants that have not configured a tenant-level backup strategy. You can create a cluster-level backup strategy for such tenants to manage their backups.
You can create a cluster-level backup strategy through the following three methods:
Method 1: Log in to the OCP console, choose Backup & Recovery > Backups. In the upper-right corner of the page, click New Backup Strategy and select Create Cluster-level Backup Strategy from the drop-down list.
Method 2: Log in to the OCP console, go to the Overview page of the cluster, and in the left-side navigation pane, select Backup & Recovery. Click Create Cluster-level Backup Strategy.
Method 3: Log in to the OCP console, go to the Overview page of the tenant, and in the left-side navigation pane, select Backup & Recovery. Click Create Cluster-level Backup Strategy.
Note
You can use Method 3 to create a cluster-level backup strategy only when no backup strategy exists for the tenant and its cluster.
Prerequisites
If you create a cluster-level backup strategy 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 and Restore.
If you create a cluster-level backup strategy by using Method 2, make sure that the user who is logged in to OCP has the following permissions:
- The Cluster Maintenance resource permission.
- The Backup & Recovery menu permission under the cluster.
If you create a cluster-level backup strategy by using Method 3, 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 under the tenant.
OceanBase Database does not support backing up a tenant that is in a locked state.
Procedure
The following example describes the procedure for Method 1.
In the left-side navigation pane, choose Backup & Recovery > Backups.
On the Backups page, hover the pointer over New Backup Strategy and click Create Cluster-level Backup Strategy.
Select a backup cluster from the drop-down list.
If the version of the backup cluster is earlier than V2.2.60, the backup method is Logical Backup.
If the version of the backup cluster is V2.2.60 or later, the backup method is Physical Backup.
Specify the following parameters to set the storage configuration and click Test.
For logical backup, select the storage configuration configured in Install a backup service.
If no backup service is installed, install one first. For more information, see Install a backup service.
For physical backup, you can select an existing storage configuration or specify a custom one. If you select an existing configuration, the following parameters will be automatically populated when you click Select Existing Configuration.
Notice
If native Alibaba Cloud OSS or Tencent Cloud COS is available, we recommend that you use it for configuration.
File: local file storage, generally NFS.
Parameter Description Storage Directory The storage directory for backup files on the current media. Backup Storage Capacity Alert Threshold The alert threshold for backup storage capacity. The default value is 80%. OSS: Alibaba Cloud OSS. OceanBase Database V2.2.76 and later support this option.
Parameter Description Storage Directory The storage directory for backup files on the current media. Access Domain Name The domain name for accessing Alibaba Cloud storage. Example: oss-cn-hangzhou.aliyuncs.com.Access User The user for accessing Alibaba Cloud storage. Access Key The user key for accessing Alibaba Cloud storage. COS: Tencent Cloud COS. OceanBase Database V2.2.76 and later, versions earlier than V4.0, or V4.2.1 and later support this option.
Parameter Description Storage Directory The storage directory for backup files on the current media. Access Domain Name The domain name for accessing objects in the Tencent Cloud COS storage bucket. Example: cos.ap-beijing.myqcloud.com.Resource Identifier (APPID) The unique resource identifier for the user dimension when developers access the COS service. You can obtain it on the API key management page of the corresponding service. Project Identity ID The project identity ID of the developer. You can obtain it on the API key management page of the corresponding service. Project Identity Key The project identity key of the developer. You can obtain it on the API key management page of the corresponding service. OBS: Huawei Cloud OBS. OceanBase Database V3.2.3.2-105000062022090916 and later, and versions earlier than V4.0.0.0 support this option.
Parameter Description Storage Directory The storage directory for backup files on the current media. Access Domain Name The domain name for accessing Huawei Cloud OBS objects. Example: obs.cn-north-4.myhuaweicloud.com.S3: storage media that is compatible with the AWS S3 protocol, including native AWS S3, Huawei Cloud OBS, China Mobile Cloud OBS, and Google GCS. OceanBase Database V4.2.1-BP7 and V4.2.3-BP1 (including) and later support this option. For more information about storage media that is compatible with the AWS S3 protocol, see Overview of the S3 protocol.
Parameter Description Storage Directory The storage directory for backup files on the current media. Access Domain Name The domain name for accessing objects in the S3 storage space (Bucket). Example: s3.us-west-2.amazonaws.com.AK The secret ID of the S3 storage space. SK The access key of the S3 storage space. Region The region information of the S3 storage space. Notice
If the storage media is AWS S3, the Region field is a required field. For other storage media such as Huawei Cloud OBS, China Mobile Cloud OBS, or Google GCS, this field is not required.
Set the scheduling configuration.
Scheduling Cycle: You can set the scheduling cycle to a week or a month. If you set the scheduling cycle to a month, you can select at most 10 days.
After you disable log backup for physical backup, the system will start log backup before data backup and disable log backup after data backup is completed.
Set the backup cleanup scheduling configuration.
Set the alert threshold. You can set the data backup timeout alert threshold, log backup latency alert threshold, and the number of days without successful data backup. After the configuration is completed, an alert will be triggered when the actual output exceeds the threshold.
(Optional) Set the secondary backup configuration.
Note
Secondary backup is not supported in OceanBase Database V4.x.
You can choose to back up the backup data files and log files to another directory. To enable secondary backup, turn on the Secondary Backup switch.
Set the storage configuration for secondary backup.
Set the scheduling configuration for secondary backup.
Click Create to create the cluster-level backup policy.