All Products
Search
Document Center

ApsaraDB for OceanBase:Backup strategies

Last Updated:Jul 15, 2024

ApsaraDB for OceanBase 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 and later.

    • 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. Once you change the remote backup region or disable the remote backup feature, 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 File 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.

    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 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 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.

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

    • 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.

    • You can enable archive backup for remote backup in OceanBase Database V2.2.77 and V3.x.

    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 the Compliance Warranty on Cross-border Data Transmission section later in this topic.

    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.pngimage

  6. Click OK.

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.