All Products
Search
Document Center

ApsaraDB RDS:Automatic backup

Last Updated:Jul 10, 2025

ApsaraDB RDS for MySQL or Serverless ApsaraDB RDS for MySQL instances support automatic backup. This topic describes how to configure a backup policy to automatically back up the data and logs of an RDS instance at regular intervals.

For other engines, see the following:

Backup introduction

You can back up your RDS instance by using one of the following methods:

  • Use ApsaraDB RDS to perform backups: ApsaraDB RDS automatically performs full (data) and incremental (log) backups.

  • Use Data Disaster Recovery to perform backups: Data Disaster Recovery performs logical backups and provides advanced backup features. For example, you can back up data across Alibaba Cloud accounts, back up individual databases or tables, back up data across regions, and store backup files in Object Storage Service (OSS).

For more information about the differences between the two backup methods, see Differences between ApsaraDB RDS backups and Data Disaster Recovery backups.

Use ApsaraDB RDS to perform automatic backups

ApsaraDB RDS supports automatic data backups and automatic log backups.

  • Data backup: This feature is enabled by default and cannot be disabled. Data backup files are retained for at least seven days. Data must be backed up at least twice each week. If you do not require many data backup files, you can modify the backup frequency and backup retention period to reduce the number of data backup files.

  • Log backup: This feature is also called incremental backup. This feature is enabled by default and can be disabled. Log backup files are retained for at least seven days. Based on data backups and log backups, you can restore the data of your RDS instance to a point in time (PITR) after the first full backup within the backup retention period. If you do not require many log backup files, you can reduce the backup retention period or disable log backup to reduce the number of log backup files.

You can refer to the Procedure section in this topic to modify the backup policy of your RDS instance, or refer to the Delete or reduce backups tutorial to reduce the number of backups for your ApsaraDB RDS for MySQL instance.

Instance type

Minimum backup frequency

Maximum backup frequency

High-performance local disk instances (RDS High-availability Edition or RDS Enterprise Edition)

Twice every week

Once every day

RDS instances that run RDS Basic Edition with cloud disks

Once every day

Cloud disk instance (High Availability Edition, Cluster Edition)

Once every 15 minutes (if you enable Increase Snapshot Frequency)

Prerequisites

If you use the ApsaraDB RDS backup service for the first time, you must use your Alibaba Cloud account to complete the Service-linked Role authorization for Data Disaster Recovery (AliyunServiceRoleForDBS).

Billing

If the total size of backup files does not exceed the free quota on backup storage, you are not charged for the backup files. If the total size of the backup files exceeds the free quota on backup storage, you are charged for the excess storage usage based on the pay-as-you-go billing method. For more information about the billing standards, see Backup fees.

Precautions

  • You cannot create backups for instances that run the following minor engine versions after the instances are locked:

    • Any minor engine version if the RDS instance runs MySQL 5.1 or MySQL 5.5.

    • 20190815 or earlier if the RDS instance runs MySQL 5.6, MySQL 5.7, or MySQL 8.0.

    Note
  • Read-only instances support only the local log retention policy. Read-only instances do not support automatic backup policies.

  • Do not execute DDL statements during a backup task. Otherwise, tables may be locked and the backup task may fail.

  • We recommend that you select an off-peak hour for backups.

  • If the number of tables that are created on your RDS instance exceeds 600,000, backups cannot be created. In this case, we recommend that you shard the databases on your RDS instance. You can log on to your RDS instance to view the number of databases and tables.

  • If the number of tables that are backed up exceeds 50,000, you cannot restore individual databases or tables.

  • After you modify the automatic backup policy for your RDS instance, the system initiates a full backup.

Procedure

Instances in some Alibaba Cloud regions support upgrading the backup policy page to the advanced version (If no upgrade entry is available, submit an application to use it). After the upgrade, you can implement sparse backup. After you click Switch to Advanced Backup Policy, the entry point to the Backup Strategy tab and the method to configure specific parameters are changed. You must configure the parameters based on your business requirements.

Important

If you modify the backup policy during a configuration change of your RDS instance, the modification may fail. We recommend that you wait until the configuration change is complete before you modify the backup policy.

Standard backup policy page (not upgraded)

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the left-side navigation pane, click Backup and Restoration.

  3. On the Backup and Restoration page, click the Backup Strategy tab. In the Basic Backup section, click Edit.

  4. Configure the following parameters and click OK.

    Note

    If your RDS instance uses cloud disks, ApsaraDB RDS creates snapshots to back up the data of the RDS instance.

    Table 1. Data backup settings

    Instance type

    Parameter

    Description

    All instances

    Data Backup Retention (Days)

    The number of days for which data backup files are retained. Default value: 7. Valid values:

    • For RDS instances that use cloud disks: 7 to 730.

      Note
      • If your RDS instance runs MySQL 5.7 on RDS Basic Edition, the value is fixed as 7.

      • If you enable Single-digit Second Backup, the valid value ranges from 7 to 730.

    • For high-performance local disk instances: 7 or more (less than 2^31).

      • Data backup files that are retained for 730 days or less are regular backup files.

      • Data backup files that are retained for more than 730 days are archived backup files. The fees for archived backup files are lower.

      Note

      If you set the value to more than 730 or select Long-term Retention Before Instance Release, you must also specify the number of archived backup files to retain. For example, you can retain the earliest two archived backup files of each month.

    Backup Cycle

    The days on which data backup operations are performed. You must select at least two days of a week.

    Backup Time

    The time at which a data backup starts. For example, you can select 08:00. We recommend that you select an off-peak hour.

    Retain Backup Files After Instance Release

    Specifies whether to retain backup files after the RDS instance is released.

    Note

    High-performance local disk instances

    Restore Individual Database/Table

    Specifies whether to enable the restoration feature for individual databases and tables. The feature is enabled by default and cannot be disabled.

    Note
    • This feature is supported only for RDS instances that run MySQL 8.0, MySQL 5.7, or MySQL 5.6 on RDS High-availability Edition with local SSDs.

    • After this feature is enabled, new backup files are gradually stored in the new physical backup format.

    Fast Restoration For Individual Databases And Tables

    Specifies whether to enable the fast restoration feature for individual databases and tables. If you enable the fast restoration feature for individual databases and tables, the data is restored at a fast speed. If you disable the fast restoration feature, the data is restored at a standard speed.

    • Standard: The data is restored at a standard speed.

    • Fast: The data is restored at a speed that is 50% to 95% faster than the standard speed.

    Note
    • After you enable the fast restoration feature for individual databases and tables, you must also specify CDM Billing Method and CDM Retention Period.

    • The fast restoration feature for individual databases and tables is supported in some Alibaba Cloud regions.

    RDS instances that use cloud disks

    Single-digit Second Backup

    Specifies whether to enable the Single-digit Second Backup feature. If the feature is enabled, a snapshot backup operation can be complete within a few seconds.

    Note

    This feature is supported only for RDS instances that run RDS High-availability Edition or RDS Cluster Edition.

    Increase Snapshot Frequency

    If you enable the high-frequency snapshot backup feature, the system can create snapshots at shorter intervals and increase the snapshot density. You can increase the frequency to up to once every 15 minutes.

    Note
    • This feature is supported only for RDS instances that run RDS High-availability Edition or RDS Cluster Edition.

    • This feature and the Single-digit Second Backup feature must be enabled at the same time. If you enable this feature when the Single-digit Second Backup feature is disabled, the system automatically enables the Single-digit Second Backup feature.

    Restore Individual Database/Table

    After this feature is enabled, you can use the backup files that are generated to restore data to the original instance or a new instance. After this feature is enabled, it cannot be disabled.

    Table 2. Log backup settings

    Log backup settings (standard version of log backup)

    Parameter

    Description

    Log Backup

    Specifies whether to enable the log backup feature. After this feature is enabled, you can restore the data of your RDS instance to a point in time. By default, the Log Backup feature is enabled.

    Log Backup Retention (Days)

    • Valid values: 7 to 730. The default value is 7.

    • The value must be less than or equal to the data backup retention period.

    Note

    If your RDS instance runs MySQL 5.7 on RDS Basic Edition, the value is fixed as 7.

    PITR settings (advanced version of log backup)

    This feature is supported only for ApsaraDB RDS for MySQL instances in some Alibaba Cloud regions. For more information about the differences between PITR and log backup, the PITR feature, and the requirements for instances that support the PITR feature, see Configure a PITR policy.

    Important

    To implement the PITR feature, your RDS instance retains additional backup files beyond the period that is specified by Time Range Of Specific Points In Time For Restoration.

    For example, if you set Time Range Of Specific Points In Time For Restoration to 7 days, the system retains backup data for 7 to 9 days. The system retains an additional full backup for more than seven days and all consecutive log backups generated from the seventh day to the day in which the last full backup is generated. You are charged for the storage of one full backup and additional log backups that are generated within one week at most.

    Parameter

    Description

    Restoration to Specific Point in Time

    Specifies whether to enable the PITR feature. After the feature is enabled, you can restore the data of your RDS instance to any point in time. The feature is an enhancement of the log backup feature. By default, Time Range of Specific Points in Time for Restoration is turned on for new RDS instances.

    Time Range of Specific Points in Time for Restoration

    The number of days during which you can restore data of your RDS instance to any point in time. If the value of this parameter is modified, the retention period of log backups is also modified.

    • Valid values: 7 to 730. Default value: 7.

    • The value must be less than or equal to the retention period of full backups.

    Note

    If your RDS instance runs MySQL 5.7 on RDS Basic Edition, the value is fixed as 7.

Advanced backup policy page (upgraded)

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the left-side navigation pane, click Backup and Restoration.

  3. On the Backup and Restoration page, click the Backup Strategy tab, and then click the circled number between MySQL and Primary Backup.

    image.png

  4. Configure the following parameters and click OK.

    Table 1. Data backup settings

    Instance type

    Parameter

    Description

    All instances

    Backup Policy

    The time range within which the backup is performed and the retention period of the backup sets. The backup must be performed at least twice a week.

    Note

    You can click the Add Backup Policy button to configure the sparse backup feature. This feature allows you to flexibly configure backup policies and retain the minimum number of backup sets. For more information, see Sparse backup.

    Backup Time

    The time at which a data backup starts. For example, you can select 08:00. We recommend that you select an off-peak hour.

    Retain Backup Files After Instance Release

    Specifies whether to retain backup files after the RDS instance is released.

    Note

    High-performance local disk instances

    High-frequency Incremental Backup

    After you enable high-frequency physical backup, the system can create backups at intervals as short as 1 hour.

    Note

    This feature is supported only for RDS instances that run MySQL 5.6, MySQL 5.7, or MySQL 8.0 on RDS High-availability Edition with local SSDs.

    Backup Encryption Status

    Specifies whether to enable the backup encryption feature.

    Cloud disk instance

    Single-digit Second Backup

    Specifies whether to enable the single-digit second backup feature. If the feature is enabled, a snapshot backup operation can be complete within a few seconds.

    Note

    This feature is supported only for RDS instances that run RDS High-availability Edition or RDS Cluster Edition.

    Restore Individual Database/Table

    After this feature is enabled, you can use the backup files that are generated to restore data to the original instance or a new instance. After this feature is enabled, it cannot be disabled.

    Table 2. Log backup settings

    Parameter

    Description

    Log Backup

    Specifies whether to enable the log backup feature. After this feature is enabled, you can restore the data of your RDS instance to a point in time. By default, the Log Backup feature is enabled.

    Log Backup Retention (Days)

    The log backup retention period. The value must be less than or equal to the data backup retention period. Valid values: 7 to 7300. Default value: 7.

    Note

    If your RDS instance runs MySQL 5.7 on RDS Basic Edition, the value is fixed as 7.

  5. Click Save in the lower-left corner of the Backup Strategy page.

Use Data Disaster Recovery to perform backups

The Data Disaster Recovery service allows you to create and configure backup plans (logical backups) to automatically back up ApsaraDB RDS for MySQL instances or self-managed MySQL databases.

Related operations

  • In addition to the automatic backup feature described in this topic, ApsaraDB RDS also allows you to manually back up all databases or specific databases and tables.

  • You can download backup files to your computer or upload the backup files to OSS.

  • You can use data restoration solutions to restore data from data backup files and log backup files to an existing instance, a new instance, or a self-managed database.

  • By default, backup files are stored in the region where the instance resides. To back up data to other regions, see Cross-region backup.

  • You can use API operations to manage the backup policy of your RDS instance or configure a Data Disaster Recovery backup plan. The following table describes the API operations.

    Classification

    API

    Description

    RDS default backup

    ModifyBackupPolicy

    Modifies the backup settings of an ApsaraDB RDS instance.

    DescribeBackupPolicy

    Queries the backup settings of an ApsaraDB RDS instance.

    DescribeBackups

    Queries a list of backup sets.

    DescribeBackupTasks

    Queries the backup tasks of an ApsaraDB RDS instance.

    Data Disaster Recovery

    CreateBackupPlan

    Creates a backup plan.

    ConfigureBackupPlan

    Configures a backup plan.

FAQ about ApsaraDB RDS backups

  • Q: Do backup operations affect the performance of my RDS instance?

    RDS edition

    Impact

    RDS High-availability Edition, RDS Cluster Edition, or RDS Enterprise Edition

    Backup operations are performed on the secondary RDS instance. In this case, the operations do not occupy the CPU resources or affect the performance of the primary RDS instance.

    Note

    In rare cases when the secondary instance is unavailable, backups are performed on the primary instance.

    RDS Basic Edition

    If an RDS instance runs RDS Basic Edition, the instance stands alone. All backup operations are performed on the RDS instance. In this case, the performance of the RDS instance decreases during a backup.

  • Q: Can I disable data backup or log backup?

    A: You cannot disable data backup. However, you can reduce the backup frequency to a minimum of twice a week and set the retention period to a minimum of seven days. You can disable log backup . You can disable the log backup feature on the Backup Strategy tab.

  • Q: If my pay-as-you-go RDS instance has overdue payments, does the system continue to automatically back up data for the instance?

    A: Within the grace period for overdue payments (within seven days after the payment becomes overdue), the automatic backup feature continues to run. After the grace period ends, Alibaba Cloud suspends the services of the RDS instance and stops charging you for the instance. At the same time, the automatic backup feature is immediately disabled. For more information, see Overdue payments.

  • Q: Why do backup tasks sometimes fail?

    A: You executed time-consuming DDL statements or UPDATE statements during a backup task. These statements triggered locks on tables, and your backup task failed as a result of the locks.

  • Q: Why is the size of a snapshot backup file dozens of GB when the data is only a few GB?

    A: The size of a backup file may be larger or smaller than the amount of data.If your RDS instance uses cloud disks, ApsaraDB RDS creates snapshots to back up the data of the RDS instance. The size of a snapshot backup file may be much larger than the amount of data. For RDS instances that use cloud disks, the free quota on backup storage is 200% of the storage capacity of the RDS instance. For high-performance local disk instances, the free quota on backup storage is 50% of the storage capacity of the RDS instance.

    Note

    When the system calculates the size of a snapshot backup file, the system counts in all the non-empty blocks to which data is written. If the write operations are scattered among blocks, none of the blocks is empty. For example, if 3 MB of data is written across two, three, or four blocks, none of these blocks is empty. In this case, the system counts in all these blocks to calculate the total size. As a result, the size of the snapshot backup file is larger than the actual amount of data.

    Therefore, the total size of all backup sets that are displayed on the Backup and Restoration page may be inconsistent with the displayed backup usage.

  • Q: Do backup files occupy the disk space of my RDS instance?

    A: Data backup files and log backup files are stored in the dedicated backup storage provided by Alibaba Cloud. These files do not occupy the storage space of your RDS instance.

    Note