All Products
Search
Document Center

ApsaraDB for OceanBase:Backup strategies

Last Updated:Apr 25, 2024

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 level-1 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 level-1 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 level-1 backup. To use archive backup, you must have local level-1 backup files. To enable the archive backup feature, contact OceanBase Technical Support.

    • Archive backup is supported only in OceanBase Database V2.2.77 or later but earlier than V4.0.0.

    • Archive backup can effectively reduce your backup costs. However, the restore speed is relatively slower than that of level-1 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, 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 large-sized 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
    • 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 on 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 seven days by default and can be retained for 2 to 365 days.

    Note

    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.

    Sparse Backup

    Disabled

    You can choose whether to enable sparse backup as needed.

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

    • You can specify a custom retention period (ranging from 30 to 7200 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 level-1 backup cycle and can be modified.

    • 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 level-1 backup.

    Remote Backup

    Disabled

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

    • In OceanBase Database V2.2.77 and V3.x, you can set an independent backup strategy for remote backup. In other versions such as V4.x, only the image mode is supported.

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

    • You can enable archive backup for remote backup.

    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 the commitment to the compliance of cross-border data transfer. For more information, see Commitment to cross-border data transfer compliance.

    Backup Retention Strategy Upon Instance Deletion

    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.

    3

  6. Click OK.

Commitment to cross-border data transfer compliance

When cross-border backup is involved in remote backup, you must sign the following commitment to the compliance of cross-border data transfer:

The region or product deployment region that you select may involve cross-border data transfer. After you confirm and agree to the commitment, you will have full disposal rights on this business data and you will be fully responsible for the transfer of this business data. You must guarantee that your data transfer behavior complies with all applicable laws, including providing thorough data security protection techniques and strategies, and fulfilling legal liabilities such as obtaining individual express consent and completing security assessment and reporting for cross-border data transfer. You must also promise that your business data does not contain any content that is restricted or prohibited from transfer or disclosure according to applicable laws. You shall bear the corresponding legal consequences for failing to comply with the aforesaid statements and warranties, and assume compensation liability for the loss suffered by Alibaba Cloud, OceanBase, and other associated entities.