OceanBase Database supports creating periodic backup strategies to perform full backups at scheduled intervals. It can also simultaneously initiate log backups and automatically clean up expired backup files.
Background information
By default, OceanBase Database uses the user workload priority mode for log backups. If the log backup rate cannot keep pace with the log generation rate, such as during large-scale data imports or when the backup media is unavailable, logs may be recycled, causing a discontinuity in the log stream. In this case, perform another data backup to restore Point-in-Time Recovery (PITR) availability. To reduce the risk of losing PITR capability, contact OceanBase Technical Support to enable the Archive Priority log backup strategy, or increase the log disk capacity to reduce the risk of log recycling.
After you enable a backup strategy, the generated data backups and log backups are stored in the object storage service of your cloud provider in the corresponding region. Depending on the object storage billing policy of the cloud provider, you may be charged for the storage space used by the backup files. Monitor the balance of your cloud provider account.
Note
- Clusters created before the end of November 2023 require manual activation of the backup feature. New clusters created after this date will have the backup strategy enabled by default.
- For clusters using Tencent Cloud, the backup and restore feature is not supported for OceanBase Database versions later than V4.0.0 but earlier than V4.2.1.
Modify a backup strategy
Log in to the OceanBase Cloud console.
In the left-side navigation pane, click Instances.
In the instance list, find the target instance, click its name, and go to the Overview page.
In the left-side navigation pane, click Backup, then click Modify Backup Strategy in the upper-right corner of the page.
On the Modify Backup Strategy page, configure the backup strategy information.
ParameterDefault valueDescriptionBackup File Storage Region Local The backup files are stored in the region where the current cluster instance is located. Data Backup Type Full Currently, only full backup is supported. Log Backup Enabled by default After the backup strategy is successfully configured and enabled, log backup is automatically enabled and cannot be disabled. Backup Cycle 04:00 on the day after the instance is created You can select the backup dates and schedule backups for specified days of the week or month. For data security, back up data at least once a week. Backup Time 04:00 You can select a backup time from the drop-down list. - Perform backups during off-peak hours.
- Avoid scheduling backups within the major compaction window, which starts one hour before and ends one hour after the major compaction time. Otherwise, backup tasks will be delayed.
Data Backup Retention Days / Point-in-Time Recovery Window 7 days Backup data is retained for 7 days by default. You can set the retention period to 2 to 7,200 days. For the relationship between the Backup Cycle and the Data Backup Retention Days / Point-in-Time Recovery Window, see Relationship between backup cycle and data backup retention days. Archive Backup Disabled by default Select the archive backup cycle and retention period. Backup data can be retained for 60 to 7,200 days. You can enable archive backup for backup files that require long-term retention and are infrequently restored. After archive backup is enabled, backup files that exceed the retention period configured for primary backup are migrated to archive backup. Backup files migrated to archive backup must be stored for at least 60 days. If you disable archive backup before a backup file has been stored for 60 days, you must pay the price difference for the remainder of the 60-day minimum storage period. Note
Archive backup is currently supported only for Alibaba Cloud and is an allowlist feature. To enable it, contact OceanBase Technical Support.
Remote Backup Disabled by default Select the remote backup cycle and retention period. Backup data can be retained for 7 to 7,200 days. Note
- The backup cycle can be configured only on a weekly basis. Remote primary backups depend on local primary backups. A remote primary backup cannot be scheduled for a time when no local primary backup is scheduled.
- Remote backup is currently supported only for Alibaba Cloud and AWS and is an allowlist feature. To enable it, contact OceanBase Technical Support.
Sparse Backup Disabled by default Select the sparse backup cycle and retention period, and specify whether to retain log backups. Sparse backup data can be retained for 60 to 7,200 days or permanently. Note
- The sparse backup cycle depends on the local primary backup cycle. You can select from the dates configured for the primary backup cycle.
- Sparse backup is currently supported only for Alibaba Cloud and is an allowlist feature. To enable it, contact OceanBase Technical Support.
Backup Retention Strategy upon Instance Release Retain all existing data backups and their associated log backups - Retain all existing data backups and their associated log backups when the instance is released:
- After the instance is released, you can view and restore data in the instance recycle bin. The backups are retained for 7 days and are then automatically deleted.
- For long-term retention, download and transfer the backups before they expire.
- Charges continue to accrue during the backup retention period and stop after the backups are deleted. For billing details, see Backup and restore billing.
- Do not retain backups: The instance cannot be restored after it is released.
Note
Backup strategies created after April 8, 2026, follow the new rules. Existing instance strategies remain unchanged for now.
After modifications are complete, click OK to save the strategy configuration.
Add a logical backup strategy
After adding a physical backup strategy, you can add a logical backup strategy on the Backup Strategy tab.
On the Backup Strategy page, click the Backup Strategy tab.
On the Backup Strategy tab, click Add Logical Backup Strategy in the upper-right corner.
On the Add Logical Backup Strategy page, configure the logical backup strategy information and click OK.
ParameterDescriptionBackup Object Select databases or tables as the backup objects to perform a logical backup. Source Tenant Select the source tenant. Database Objects In the source database area, select the target databases and add them to the list of databases to back up. Table Objects In the source table area, select the target tables and add them to the list of tables to back up. Backup Cycle You can select the days for backup and specify weekly or monthly backup dates. Backup Time You can set the specific backup time from the drop-down list. - Perform backups during off-peak hours based on your actual situation.
- Avoid setting the time within the major compaction window (one hour before and one hour after the major compaction time), as this will delay the backup task.
Relationship between backup cycle and data backup retention days
Basic concepts
The backup cycle specifies how frequently full data backups are performed. You can schedule a backup once a week, once a day, or on custom days, such as every Monday, Wednesday, and Friday. The backup interval affects how frequently backup sets are generated and the available restore granularity.
The data backup retention period defines the backup lifecycle and the Point-in-Time Recovery (PITR) window. Backups older than the configured retention period are automatically deleted.
Implementation mechanism
The backup cycle and data backup retention period jointly determine the number of data backup sets retained and the actual log backup retention period.
The system retains backup sets based on the dependencies between data backups and log backups so that PITR is available within the configured window.
To restore data to a specific point in time, the system generally uses the most recent data backup before the restore point and the log backups generated between the data backup and the restore point. Therefore, the actual backup retention period may exceed the configured period to support restores within the configured window.
Typical configuration examples
Example 1: Back up once a week
Backup Cycle |
Data Backup Retention Days / Point-in-Time Recovery Window |
Maximum Number of Retained Data Backup Sets |
Estimated Actual Retention Days for Log Backup |
|---|---|---|---|
| Weekly backup | 2 days | 2 | [2, 10] days |
| Weekly backup | 7 days | 3 | [8, 15] days |
Example 2: Back up once a day
Backup Cycle |
Data Backup Retention Days / Point-in-Time Recovery Window |
Maximum Number of Retained Data Backup Sets |
Estimated Actual Retention Days for Log Backup |
|---|---|---|---|
| Back up daily | 2 days | 3 | [2, 4] days |
| Back up daily | 7 days | 8 | [8, 9] days |
Example 3: Back up every Monday, Wednesday, and Friday
Backup Cycle |
Data Backup Retention Days / Point-in-Time Recovery Window |
Maximum Number of Retained Data Backup Sets |
Estimated Actual Retention Days for Log Backup |
|---|---|---|---|
| Back up every Monday, Wednesday, and Friday | 2 days | 3 | [3, 5] days |
| Back up every Monday, Wednesday, and Friday | 7 days | 4 | [8, 10] days |
