All Products
Search
Document Center

ApsaraDB for OceanBase (Deprecated):Backup strategies

Last Updated:Feb 25, 2026

OceanBase Database allows you to modify backup strategies. You can modify parameters such as the backup cycle, backup time, backup retention period, whether to enable archive backup, and whether to enable remote backup based on business needs. When you create a cluster instance, a local primary backup strategy is created by default, and log backup is enabled.

Concepts

  • Archive backup: You can enable archive backup for backup files that are not frequently restored and must be retained for a long time. Archive backup will incur additional charges. For more information, see Billing for backup and restore. After archive backup is enabled, backup files that exceed the retention period specified for primary backup will be migrated to the path where archive backup files are stored. Archive backup files are retained for at least 60 days. If you disable archive backup before the 60-day retention period ends, you will still be charged for 60-day retention.

    Note
    • Archive backup depends on local primary backup. To use archive backup, you must have local primary backup files. To enable the archive backup feature, contact OceanBase Technical Support.

    • Archive backup is supported only in OceanBase Database V2.2.77 and later.

    • Archive backup can effectively reduce your backup costs. However, the restore speed is relatively slower than that of primary backup because low-speed backup media is used for archive backup.

    • At present, archive backup is not supported for serverless instances.

  • Remote backup: Remote backup depends on local backup. However, the backup frequency, backup cycle, and data retention strategy of remote backup can be different from those of local backup. In remote backup, a copy of the backup files will be stored in the specified region, and the occupied space will be separately billed. For more information, see Billing for backup and restore. You can set only one remote backup region for each backup instance. After you change the remote backup region or disable remote backup, the remote backup files stored in the original region will be automatically cleared by the system.

    You can set the backup frequency to weekly or monthly. For weekly backup, the system displays the days in a week that you selected for local backup. If you selected more than one day for local backup, you can specify to perform at least one time of remote backup. For monthly backup, you can specify to perform one or two times of remote backup.

    Remote backup applies to scenarios that demand low data consistency but high data availability, such as the business of large enterprises and international companies. In such scenarios, remote backup can help improve data security, ensure data availability, and reduce the data restore time.

    Note
    • Generally, data restore in a remote backup scenario depends on the last data backup and the log backup generated between the restore time and last data backup time. The actual backup retention period may be longer than the specified period to ensure that the data within the specified period can be restored.

    • At present, remote backup is not supported for serverless instances.

  • Sparse backup: Sparse backup allows you to set backup strategies more flexibly and retain the fewest backup sets to minimize your storage costs. Sparse backup often applies to business scenarios that demand long-term storage of backup files, such as audit. If you want to ensure that data can be restored at any point in time within the backup period, you must retain the log backups. If you disable sparse backup, the system will immediately clear the corresponding backup files.

    Note
    • Sparse backup is available only to allowlisted users. To enable sparse backup, contact OceanBase Technical Support.

    • Sparse backup is not supported for expired backup sets.

    • After you enable a sparse backup strategy, you can modify or disable sparse backup.

      • After you modify the backup cycle or backup retention strategy, if the retained sparse backup files do not comply with the latest strategy, they will be deleted based on the latest strategy.

      • After you disable the sparse backup strategy, the retained sparse backup files will be deleted.

    • The billing items and billing method of a sparse backup strategy are the same as those of a primary backup strategy. For more information, see Billing for backup and restore.

    • After sparse backup is enabled, if no backup set is successfully generated on a day due to a backup failure or because the backup is time-consuming and completed on the next day, no backup set will be retained for this day. For example, if you specify to back up data on the first day of each month and retain the backup set for 30 days, but the backup fails during the backup window on August 1, no backup set will be retained for August 1.

    • After you enable sparse backup, you cannot enable archive backup or remote backup.

    • Sparse backup is not supported for serverless instances.

Set a backup strategy

  1. Log in to the  ApsaraDB for OceanBase console.

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

  3. In the instance list, click the name of the target cluster instance to go to the Cluster Instance Workspace page.

  4. In the left-side navigation pane, click Backup and Restore. On the page that appears, click the Backup Strategy tab to view the backup strategy for the cluster instance. If you back up the cluster for the first time, the default backup strategy is displayed.

  5. Click Modify Backup Strategy in the upper-right corner and set the following parameters.

    Parameter

    Default value

    Description

    Backup Storage Region

    Local

    Backup files are stored in the region where the current cluster instance is located.

    Data Backup Type

    Full

    At present, only full data backup is supported.

    Log Backup

    Enabled

    Log backup is enabled by default and cannot be disabled.

    If you enable log backup, you can restore the cluster to the snapshot point of the backup set and any point in time within the time range specified for the log backup.

    Backup Cycle

    The day after the cluster instance is created.

    For example, if you create a cluster instance on Monday, the default value of this parameter is Tuesday.

    You can specify one or more days in a week or month on which data is backed up as needed. The system backs up data on the specified days every week or month.

    We recommend that you back up data at least once a week for security purposes.

    Backup Time

    04:00

    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 a backup time within the major compaction window, which is one hour before and one hour after a major compaction is performed. Otherwise, the backup will be delayed.

    Data Backup Retention Period (Days)

    7

    Backup data is retained for 7 days by default, and can be retained for 2 to 7,200 days. For more information about the relationship between the backup cycle and data backup retention period, see Relationship between the backup cycle and data backup retention period.

    Sparse Backup

    Disabled

    You can choose whether to enable sparse backup as needed.

    • The backup cycle for sparse backup depends on local primary backup. You can select days for sparse backup among those selected for local primary backup.

    • You can specify a custom retention period (ranging from 30 to 7,200 days) for sparse backup data, or choose to permanently retain the backup data.

    • You can choose whether to retain log backups.

    Archive Backup

    Disabled

    You can determine whether to enable archive backup based on your business needs.

    • By default, the archive backup cycle is the same as the primary backup cycle and can be modified.

    • When a local primary backup file expires, the system automatically converts it to an archive backup file. The retention period of the archive backup file is calculated from the time when the local primary backup file is generated, and must be longer than that of the local primary backup file.

    • Archive backup data can be retained for 60 to 7,200 days.

    • The backup type, backup storage region, and log backup information of archive backup are the same as those of primary backup.

    Remote Backup

    Disabled

    You can determine whether to enable remote backup based on your business needs.

    • You can set the remote backup cycle to weekly or monthly.

      Note

      Remote primary backup depends on local primary backup. You can select days for remote primary backup only from those available for local primary backup.

    • Remote backup data is retained for 7 days by default, and can be retained for 7 to 7,200 days.

    Remote Region for Backup File Storage

    None

    Only one remote storage region can be specified and cannot be modified.

    Note

    When cross-border backup is involved, you must sign a compliance warranty on cross-border data transmission. For more information, see Compliance warranty on cross-border data transmission.

    Backup Retention Strategy upon Instance Release

    When releasing an instance, retain all existing data backups and corresponding log backups.

    • If you choose to retain all existing data backups and corresponding log backups when you release an instance, you can view and restore data of this cluster instance in the instance recycle bin. If you refund the balance of an instance, refund an instance within five days for no reason, release a expired subscription instance, or release a pay-as-you-go instance with arrears, the instance will not enter the instance recycle bin.

      Note

      If you choose to retain the backup files when you release an instance, fees will be incurred. For more information, see Billing for backup and restore.

    • If you choose to retain no backups when you release an instance, the instance cannot be restored.

    p374160.png

  6. Click OK.

Relationship between the backup cycle and data backup retention period

Concepts

  • Backup cycle: the interval for performing a full backup. You can specify to back up data every week, every day, or on specified days such as every Monday, Wednesday, and Friday. The backup cycle affects the generation density and restore granularity of backup sets.

  • The data backup retention period controls the lifecycle of backups to ensure Point-in-Time Recovery (PITR). Expired backups are automatically deleted.

Working mechanism

  • The backup cycle and data backup retention period jointly determine the number of retained backup sets and log backup retention period.

  • The system retains backup sets based on the association between data and logs, ensuring PITR within the specified period.

  • Generally, data restore depends on the latest data backup and the log backup generated between the restore time and last data backup time. The actual backup retention period may be longer than the specified period to ensure that the data within the specified period can be restored.

Typical configuration examples

Example 1: Back up data once every week

Backup cycle

Data backup retention period

Maximum number of backup sets retained

Actual log backup retention period

Weekly

2 days

2

[2, 10] days

Weekly

7 days

3

[8, 15] days

Example 2: Back up data once every day

Backup cycle

Data backup retention period

Maximum number of backup sets retained

Actual log backup retention period

Daily

2 days

3

[2, 4] days

Daily

7 days

8

[8, 9] days

Example 3: Back up data once every Monday, Wednesday, and Friday

Backup cycle

Data backup retention period

Maximum number of backup sets retained

Actual log backup retention period

Once every Monday, Wednesday, and Friday

2 days

3

[3, 5] days

Once every Monday, Wednesday, and Friday

7 days

4

[8, 10] days

Compliance warranty on cross-border data transmission

When remote backup involves cross-border data transmission, you must sign a compliance warranty on cross-border data transmission. The specific content is as follows:

If you use this service or this feature, the data of your business in the cloud will be transmitted to the region that you specify. This may result in cross-border data transmission. You will have full permissions on your business data and shall be fully responsible for the transmission of your business data. You shall promise that the transmission of your business data is in compliance with related laws and regulations, which means you shall abide by the following obligations: 1. Provide full-fledged technologies and strategies to ensure data security. 2. Provide clear service agreements for your users. 3. Evaluate the security of cross-border data transmission and report the situation of cross-border data transmission. You shall also promise that your business data does not contain illegal content or content that must not be transmitted or shared. If you do not abide by the preceding requirements, you will be liable for the legal consequences arising therefrom and shall assume the liability for damages that are brought to Alibaba Cloud, ApsaraDB for OceanBase, or other related enterprises.