Cluster-level backup policies apply only to tenants that have not configured a tenant-level backup policy. You can configure a cluster-level backup policy for such tenants to enable unified management.
You can create a cluster-level backup policy through any of the following three methods:
Method 1: Log in to OCP, go to Backup and Recovery > Backup, and select Create Cluster-level Backup Strategy from the New Backup Strategy drop-down list in the upper-right corner of the page.
Method 2: Log in to OCP, go to the cluster Overview page, select Backup & Restore from the left navigation pane, and click Create Cluster-level Backup Strategy.
Method 3: Log in to OCP, go to the tenant Overview page, select Backup & Restore from the left navigation pane, and click Create Cluster-level Backup Strategy.
Note
You can use Method 3 to create a cluster-level backup policy only when neither the tenant nor its cluster has a backup policy.
Prerequisites
When creating a cluster-level backup strategy via Entry 1, ensure the current OCP user has the following permissions:
- Cluster Maintenance or Tenant Maintenance resource permissions.
- Backup and Restore Backup menu permissions.
When creating a cluster-level backup strategy via Entry 2, ensure the current OCP user has the following permissions:
- Cluster Maintenance resource permissions.
- Cluster Backup menu permissions.
When creating a cluster-level backup strategy via Entry 3, ensure the current OCP user has the following permissions:
- Cluster Maintenance or Tenant Maintenance resource permissions.
- Tenant Backup & Restore menu permissions.
OceanBase does not support backing up tenants that are locked.
Procedure
The following steps use Entry 1 as an example.
In the left navigation bar, click Backup & Restore > Backup.
On the Backup page, hover the cursor over New Backup Strategy and click Create Cluster-level Backup Strategy.
Select the backup cluster from the drop-down list.
If the backup cluster version is earlier than V2.2.60, the backup method is Logical Backup.
If the backup cluster version is V2.2.60 or later, the backup method is Physical Backup.
Configure the storage settings by specifying the following parameters, then click Test.
For logical backup, select the storage configuration configured in Install Service.
If the backup service is not installed, you must install it first. For installation instructions, see Install Service.
For physical backup, you can customize the configuration or select an existing one. When customizing, refer to the parameters below; when selecting an existing configuration, click Select Existing Configuration to automatically populate the following parameters.
Note
When a native OSS storage type is available, it is recommended to configure using the OSS method first.
File: Local file storage, typically NFS.
ParameterDescriptionStorage Directory The directory on the current medium where backup files are stored. Backup Storage Capacity Alert Threshold Sets the alert threshold for backup storage capacity. Default value is 80%. OSS: Alibaba Cloud OSS object storage. Supported only for OceanBase V2.2.76 and later.
ParameterDescriptionStorage Directory The directory on the current medium where backup files are stored. Access Domain Name Enter the domain name for accessing the Alibaba Cloud storage endpoint. Example: oss-cn-hangzhou.aliyuncs.com.Access User Enter the AccessKey ID for accessing the Alibaba Cloud storage endpoint. Access Key Enter the AccessKey Secret for accessing the Alibaba Cloud storage endpoint. Advanced Configuration Effective only for object storage using the OSS protocol. - checksum_type: Data checksum type configuration: md5 (default)/no_checksum. Supported OceanBase versions: [V4.2.1.6, V4.2.2.0), [V4.2.3.0, +∞).
- enable_worm: Specifies whether OceanBase Database performs write and delete operations on this path according to the bucket's retention policy (WORM policy): false (default)/true. Supported OceanBase versions: [V4.2.5.7, V4.3.0.0), [V4.3.5.2, +∞).
Note
The OSS compliant retention policy has WORM (Write Once Read Many) characteristics, meeting the requirement to store and use data in an indeleterable and unalterable manner. If you want to prevent any user (including the resource owner) from modifying or deleting objects in an OSS bucket within a specified period, you can configure a WORM retention policy for the bucket. Before the retention period specified by the policy expires, only uploading and reading objects from the bucket are supported. Objects can be modified or deleted after the retention period expires.
OBS: Huawei Cloud OBS object storage. Supported only for OceanBase V3.2.3.2-105000062022090916 and later, but earlier than V4.0.0.0.
ParameterDescriptionStorage Directory The directory on the current medium where backup files are stored. Access Domain Name Enter the domain name for accessing the Huawei Cloud OBS object. Example: obs.cn-north-4.myhuaweicloud.com.S3: Supports storage media compatible with the AWS S3 protocol, including native AWS S3, Huawei Cloud OBS, Tianyi Cloud OBS, and Google GCS. This is supported only in OceanBase Database V4.2.1-BP7 and V4.2.3-BP1 (inclusive) and later. For more information about storage media supporting the AWS S3 protocol, see S3 protocol description.
ParameterDescriptionStorage Directory The directory on the current storage medium where backup files are stored. Access Domain Name The domain name for accessing objects in the S3 storage space (Bucket), for example, s3.us-west-2.amazonaws.com.AK The secret access key ID of the S3 storage space. SK The access key of the S3 storage space. Region The region of the S3 storage space. Advanced Configuration Applicable only to object storage using the S3-compatible protocol. - delete_mode: File deletion mode. Valid values: delete (default) and tagging. Supported OceanBase versions: [V4.2.3.0, V4.2.5.0), [V4.3.0.0, +∞).
- checksum_type: Data checksum type. Valid values: md5 (default) and crc32. Supported OceanBase versions: [V4.2.1.6, V4.2.2.0), [V4.2.3.0, +∞).
- addressing_model: Resource addressing mode. Valid values: virtual_hosted_style (default) and path_style. Supported OceanBase versions: [V4.2.1.9, V4.2.2.0), [V4.2.5.1, V4.3.0.0), [V4.3.5.0, +∞).
Note
When the storage medium is AWS S3, the Region information is a required parameter. It is not required for other storage media such as Huawei Cloud OBS, Tianyi Cloud OBS, or Google GCS.
Log backup storage: When the OceanBase version is V4.0 or later, you can specify a separate storage configuration for log archiving. The default is Same as data backup, which means using the same storage configuration as data backup. If you need to use a different storage path, select Configure separately and set it up as described above for data backup storage.
Configure the scheduling settings.
Schedule Cycle: Choose weekly or monthly. When the schedule cycle is monthly, you can select at most 10 days.
After disabling log backup for physical backup, the system starts log backup before data backup begins and shuts it down after data backup completes.
Note
When the OceanBase version is V4.0 or later, you can specify a separate storage configuration for log archiving in Step 4, allowing log backup and data backup to use different storage paths.
Configure the cleanup scheduling for expired backups.
Configure alert thresholds. You can configure the data backup timeout alert threshold, log backup delay alert threshold, and number of days without successful data backup. After configuration, alerts will be triggered when actual output exceeds the thresholds.
(Optional) Configure secondary backup.
Note
OceanBase Database V4.x does not support secondary backup.
You can choose to back up backup data files and log files to another directory. To enable secondary backup, turn on the Second Backup switch.
Configure the storage settings for the secondary backup.
Configure the scheduling settings for the secondary backup.
Click Create to finish creating the cluster-level backup policy.
