OceanBase Cloud Platform (OCP) allows you to configure personalized backup and restore strategies based on the tenant dimension. After you create a tenant-level backup strategy for a tenant, the tenant is no longer affected by the cluster-level backup strategy.
Note
If a cluster-level backup strategy exists in the cluster to which the tenant belongs, the content of the cluster-level backup strategy is populated by default when you create a tenant-level backup strategy.
Prerequisites
You can create backup strategies only for tenants of a cluster of OceanBase Database V4.0.0 or later.
If the OceanBase Database version of the cluster is V4.0.0 or later, ensure that the following requirements are met before you configure second backup:
- To enable second backup, which is disabled by default, change the value of the
ocp.backup.advanced-secondary-backup.enableparameter totruein System Parameters. - The storage media for both regular backup and second backup is Alibaba Cloud Object Storage Service (OSS).
- The retention period of second backup files is shorter than that of regular backup files.
- If the backup scheduling cycle is weekly, the retention period of second backup files must be longer than or equal to 7 days. If the backup scheduling cycle is monthly, the retention period of second backup files must be longer than or equal to 30 days.
- Regular backup files and second backup files cannot be stored in the same bucket. In addition, you cannot specify a custom storage path for second backup files.
- The AccessKey pair of a regular backup job must have the permissions for cross-region replication. Otherwise, the job cannot be scheduled. If the job fails to be executed, you can retry the job after you configure the permissions.
- The bucket for regular backup cannot be configured with cross-region replication rules. Otherwise, the job cannot be scheduled. If the job fails to be executed, you can retry the job after you delete these rules.
- If the destination of a second backup job is an independently deployed OSS bucket, you must configure the
cloudNameandcloudLocationfields of the OSS bucket in System Parameters. The corresponding parameters areocp.backup.advanced-secondary-backup.target-cloud-nameandocp.backup.advanced-secondary-backup.target-cloud-location.
- To enable second backup, which is disabled by default, change the value of the
Procedure
You can create a tenant-level backup strategy by using the following two methods:
Method 1:
Log on to the OCP console. In the left-side navigation pane, choose Backup & Recovery > Backups. Then, you can create a tenant-level backup strategy on the Backups page.
Method 2:
Log on to the OCP console and go to the Overview page of a cluster. In the left-side navigation pane, click Backup & Recovery. Then, you can create a tenant-level backup strategy on the Backup & Recovery page.
The procedure of Method 1 is described as follows:
In the left-side navigation pane, choose Backup & Recovery > Backups.
On the Backups page, move the pointer over New Backup Strategy and select Create Tenant-level Backup Strategy.
Select the tenant to back up from the drop-down list.
For a cluster of a version earlier than OceanBase Database V2.2.60, logical backup is used.
For a cluster of OceanBase Database V2.2.60 and later, physical backup is used.
Specify the following storage configuration parameters and click Test.
For logical backup, select the storage configuration configured during service installation.
If no backup service is installed, you must first install the backup service. For more information, see Install a service.
For physical backup, you can configure a custom configuration or select an existing configuration. If you choose to configure a custom configuration, configure the parameters based on the following tables. If you choose to select an existing configuration, click Select Existing Configuration. Then, the system automatically populates the following parameters.
Notice
If the native Alibaba Cloud OSS or Cloud Object Storage (COS) storage type is available, we recommend that you select the OSS or COS storage type.
File: your local file storage system. Generally, Network File System (NFS) is used.
Parameter Description Storage Directory The directory in which the backup files are stored on the storage service. If you have configured a backup strategy for the cluster to which the tenant belongs, we recommend that you specify the same storage directory as that of the cluster. Otherwise, the backup statistics of the tenant will be affected. Alert Threshold for Backup Storage Capacity The threshold for backup storage capacity alerts. Default value: 80%.OSS: Alibaba Cloud OSS, which is supported only in OceanBase Database V2.2.76 and later.
Parameter Description Storage Directory The directory in which the backup files are stored on the storage service. If you have configured a backup strategy for the cluster to which the tenant belongs, we recommend that you specify the same storage directory as that of the cluster. Otherwise, the backup statistics of the tenant will be affected. Domain The domain name for accessing the files stored in Alibaba Cloud OSS, such as oss-cn-hangzhou.aliyuncs.com.User The user for accessing the files stored in Alibaba Cloud OSS. AccessKey Pair The AccessKey pair for accessing the files stored in Alibaba Cloud OSS. COS: Tencent Cloud COS, which is supported only in OceanBase Database V2.2.76 and later but earlier than V4.0, and in OceanBase Database V4.2.1 and later.
Parameter Description Storage Directory The directory in which the backup files are stored on the storage service. If you have configured a backup strategy for the cluster to which the tenant belongs, we recommend that you specify the same storage directory as that of the cluster. Otherwise, the backup statistics of the tenant will be affected. Domain The domain name for accessing the files stored in the COS bucket, such as cos.ap-beijing.myqcloud.com.Resource Identity (APPID) The unique resource identifier at the user dimension when you access the COS bucket as a developer. You can obtain the APPID on the API key management page of COS. Project ID The ID of the developer. You can obtain the ID on the API key management page of COS. Project Key The key of the developer. You can obtain the key on the API key management page of COS. S3: object storage services that support the AWS Simple Storage Service (S3) protocol, such as the native Amazon Web Services (AWS) S3, Huawei Cloud OBS, Tianyi Cloud OBS, and Google Cloud Storage (GCS). These object storage services are supported only in OceanBase Database V4.2.1-BP7, V4.2.3-BP1, and later. For more information about Amazon S3-compatible object storage services, see Amazon S3 protocol.
Parameter Description Storage Directory The directory in which the backup files are stored on the storage service. If you have configured a backup strategy for the cluster to which the tenant belongs, we recommend that you specify the same storage directory as that of the cluster. Otherwise, the backup statistics of the tenant will be affected. Domain The domain name for accessing the files stored in the S3 bucket, such as s3.us-west-2.amazonaws.com.AK The AccessKey ID of the S3 bucket. SK The AccessKey secret of the S3 bucket. Region The region of the S3 bucket. Notice
The Region parameter is required when Amazon S3 is used, and is not required when Huawei Cloud OBS, Tianyi Cloud OBS, or GCS is used.
Specify parameters in the Scheduling Settings section.
Scheduling Cycle: If you set the scheduling cycle to Months, you can select at most 10 days.
If you need to perform physical backup, log backup must be enabled.

Schedule the cleanup of expired backup files.

Specify alert thresholds. You can specify the timeout threshold for data backup jobs, alert threshold for log backup delays, and alert threshold for the number of days without successful data backup. After you set a threshold, an alert is triggered when the threshold is reached.

(Optional) Configure second backup settings.
To back up the data backup files and log backup files to another directory, turn on Second Backup.
Configure storage settings for second backup.
Configure scheduling settings for second backup.
Click Create.