Backup strategies

2025-06-24 11:54:40  Updated

OceanBase Database supports the creation of periodic backup strategies, which perform full backups at specified intervals.

Background information

The periodic backup strategy of OceanBase Database allows you to perform full backup on a specified instance and simultaneously initiate log backup and automatically clean up expired backup files.

After a backup strategy is enabled, the generated data backup files and log backup files are stored in the object storage service in the corresponding region of your cloud service vendor. You may be charged for the storage space occupied by your backup files based on the billing strategy for the object storage service of your cloud service vendor. Make sure that your cloud service account has a sufficient balance.

Note

  • Instances created before the end of November 2023 require manual activation of the backup feature. For Tencent Cloud and AWS instances created after this date, the backup feature is enabled by default in DBaaS or SaaS mode. In MaaS mode, manual activation is still required.
  • For Tencent Cloud instances, the backup feature is not supported for OceanBase Database versions later than V4.0.0 but earlier than V4.2.1.

Create a backup policy

  1. Log in to the OceanBase Cloud console.

  2. In the left-side navigation pane, click Instances.

  3. In the instance list, find the target instance, click the instance name, and go to the Overview page of the instance.

  4. In the left-side navigation pane, click Backup. On the Backup policy tab, click Enable backup policy.

  5. On the settings page for the backup policy, specify the backup policy details.

    Parameter Default Value Description
    Backup Cycle 04:00 a.m. on the next day after the instance is created You can select the days on which you need to back up data and perform backup operations on those days according to the specified weekly or monthly dates. We recommend that you back up your data at least once a week for data security reasons.
    Backup Time 04:00 a.m. You can select a backup time from the drop-down list.
    • We recommend that you select a point in time during off-peak hours.
    • Do not select the time within the major compaction window, which is one hour before and one hour after the major compaction time. Otherwise, the backup task will be delayed.
    Data Backup Retention Days / ATR Days 7 Days By default, backup data is retained for 7 days, and can be retained for 2 to 730 days. For more information about the relationship between Backup Cycle and Data Backup Retention Days / ATR Days, see [Considerations](#Relationship between backup cycle and data backup retention days).
    Data Backup Type Full At present, full backup is supported.
    Log Backup Enabled After a backup policy is configured and enabled, log backup is enabled automatically and cannot be disabled.
    Cluster Backup Retention Strategy Do not retain all backup sets of this cluster instance. After the cluster instance is released, all its backup sets cannot be recovered.
  6. Click OK.

  7. On the backup recovery page, you can view the details of the backup policy. You can also modify, disable, and enable the backup policy.

    Note

    After you disable a backup policy, all historical automatic backups will be deleted. We recommend that you restore the backup data to a new instance before disabling this feature to avoid data loss.

Relationship between the backup cycle and the data backup retention period

Basic concepts

  • The backup cycle indicates the time interval for performing full data backups. It can be a backup per week, per day, or a custom schedule (such as backing up on Monday, Wednesday, and Friday). The backup cycle interval affects the density of backup set generation and the restore granularity.
  • The data backup retention period controls the backup lifecycle and ensures the ability for Point-in-Time Recovery (PITR). Excessively old backups are automatically deleted.

Implementation mechanism

  • The backup cycle and the data backup retention period determine the maximum number of data backup sets that can be retained and the actual number of days that log backups can be retained.

  • The system retains backup sets based on the correlation between data and logs to ensure that you can perform PITR within the configured time range.

  • Data recovery generally depends on the most recent data backup before the specified restore time point and the log backups between them. To ensure data recoverability within the retention period, the actual backup retention period may exceed the configured period.

Typical configurations

Example 1: Weekly backup

Backup Cycle Data Backup Retention Period / Arbitrary Restore Time Period Maximum Number of Data Backup Sets Retained Expected Actual Log Backup Retention Period
Backup Once a Week 2 Days 2 Sets [2, 10] Days
Backup Once a Week 7 Days 3 Sets [8, 15] Days

Example 2: Daily backup

Backup Cycle Data Backup Retention Period / Arbitrary Restore Time Period Maximum Number of Data Backup Sets Retained Expected Actual Log Backup Retention Period
Backup Once a Day 2 Days 3 Sets [2, 4] Days
Backup Once a Day 7 Days 8 Sets [8, 9] Days

Example 3: Backup on Monday, Wednesday, and Friday

Backup Cycle Data Backup Retention Period / Arbitrary Restore Time Period Maximum Number of Data Backup Sets Retained Expected Actual Log Backup Retention Period
Backup on Monday, Wednesday, and Friday 2 Days 3 Sets [3, 5] Days
Backup on Monday, Wednesday, and Friday 7 Days 4 Sets [8, 10] Days

Contact Us