ApsaraDB RDS for MySQL instances (including serverless instances) support automatic backups, which include full data backups and incremental log backups. This topic explains how to configure an automatic backup policy for your data and log backups.
Billing
Backups are free if your usage is within the free quota. If you exceed this quota, billing is based on usage. For details about the free quota and pricing, see Backup fees.
Usage notes
Enabled by default: Data backup (full backup) is enabled by default and cannot be disabled. They are retained for a minimum of 7 days, with a minimum frequency of twice per week.
Engine Version: Backups cannot be started for instances with the following minor engine versions if the instance is locked:
ApsaraDB RDS for MySQL 5.1 and 5.5: all minor engine versions.
ApsaraDB RDS for MySQL 5.6, 5.7, and 8.0: minor engine versions earlier than 20190815.
NoteTo upgrade the major or minor engine version of your instance, see Upgrade database version or Upgrade minor engine version.
For more information, see What to do when the instance status is Locking.
Read-only instances: Read-only instances only support configuring a local binary log retention policy. They do not support automatic backup policies.
DDL operations: Do not perform DDL operations during a backup. Doing so can cause a table lock and lead to backup failure.
Avoid peak hours: To minimize the impact on your services, schedule backups during off-peak hours.
Restoration: If the number of tables in a backup exceeds 50,000, the backup cannot be used for database/table restoration. Full database restoration is not affected.
Backup failure: Backups will fail if the number of tables exceeds 600,000.
Backup policy modification: Modifying a backup policy immediately triggers a new full backup.
Before you begin
Before using the backup feature of RDS for the first time, ensure your Alibaba Cloud account has authorized the service-linked role AliyunServiceRoleForDBS.
Configure a backup policy
Step 1: Navigate to the configuration page
Log on to the ApsaraDB RDS console and 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 instance ID.
In the left-side navigation pane, choose Backup and Restoration.
Click the Backup Strategy tab. By default, the console displays the basic backup policy page. If you have upgraded to an advanced backup policy, the console shows the advanced backup policy page.
Step 2: Configure core parameters
The core parameters are consistent for both basic and advanced backup policies.
Data backup settings
Data backup (full backup) is enabled by default and cannot be disabled. The minimum backup retention period is 7 days, and the minimum frequency is twice per week.
Parameter | Description |
Snapshot Backup Cycle | The minimum frequency is twice per week. After you enable high-frequency snapshots for an instance that uses cloud disks, you can set the frequency to a maximum of once every 15 minutes. |
Snapshot Backup Retention Period | The default is 7 days. The valid range is:
|
Start At | To reduce the potential impact on your services, select off-peak hours. |
Retain Backup Files after Instance Release | Select whether to retain backup files after the instance is released. Note We recommend that you select Latest or All. After the instance is released, you can go to the Deleted Instance Backups page to download the backup for restoration. For more information, see Retain backup files for a long period of time. |
Log backup settings
Log backups (incremental backups) enable you to perform Point-in-Time Recovery (PITR).
Log backup settings
Parameter | Description |
Log Backup | When enabled, you can restore data to a specific point in time. This is enabled by default. |
Log Backup Retention Period |
Note For RDS Basic Edition instances that run MySQL 5.7, this parameter is fixed at 7 days. |
Point-in-time recovery settings
This setting is currently available only for RDS for MySQL instances in specific regions. For information about the differences between point-in-time recovery and log backup, the features of point-in-time recovery, and the instance requirements, see Configure the PITR feature.
To enable point-in-time recovery, the instance retains an additional backup set beyond the specified log backup retention period.
For example, if the Log Backup Retention Period is set to 7 days, the actual retention period will be 7 to 9 days. Specifically, the system retains the latest full backup outside the 7-day window and all consecutive log backups from that full backup to the end of the 7-day period. However, you are only billed for one full backup and up to one extra week of log backups.
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.
Note If your RDS instance runs MySQL 5.7 on RDS Basic Edition, the value is fixed as 7. |
Advanced features (optional)
Parameter | Applicable instance | Description |
Backup within Seconds | Instances with cloud disks (High-availability Edition/Cluster Edition) | When enabled, this feature reduces snapshot backup times to seconds. |
Increase Snapshot Frequency | Instances with cloud disks (High-availability Edition/Cluster Edition) | High-frequency snapshot backup shortens the snapshot cycle and increases snapshot density. Once enabled, you can schedule backups to run as frequently as every 15 minutes. Note This feature must be enabled together with Backup within Seconds. If you enable this feature while Backup Within Seconds is disabled, the system automatically enables Backup within Seconds. |
Restore Individual Database/Table | All instances | When enabled, the generated backup files support the recovery of a single database or table without restoring the entire instance. |
Fast Restoration | Instances with Premium Local SSDs (available only in specific regions) | Enables accelerated recovery for individual databases and tables. If enabled, the recovery speed is set to Fast. Otherwise, the speed is Standard.
Note After you enable Fast Restoration, you must also select a CDM Billing Method and a CDM Retention Period. |
Backup Encryption Status | Instances with Premium Local SSDs (available for advanced backup policies) | To enhance data security, encrypt backup files. |
Step 3: Save and verify the policy
Click OK or Save.
The system immediately triggers a full backup based on the new policy.
You can view the new backup set in the Data Backups list on the Backup and Restoration page. After the first backup succeeds, the system automatically performs subsequent backups according to the new policy.
Related operations
In addition to the automatic backup feature, you can use the logical backup feature of Data Disaster Recovery to automatically back up RDS for MySQL or self-managed MySQL instances. This feature supports cross-account backups, single database or table backups, remote backups, and storing backups in OSS. For a detailed comparison, see Differences between default RDS backups and Data Disaster Recovery backups.
In addition to the automatic backup feature, ApsaraDB RDS also lets you manually back up all databases or specific databases and tables.
You can download a backup to a local machine or upload it to OSS.
You can use a data recovery plan to restore data backups and log backups to an existing instance, a new instance, or a local database.
By default, backup files are stored in the same region as the instance. To back up an instance to another region, see Use the cross-region backup feature.
You can manage RDS instance backup policies or configure Data Disaster Recovery backup plans by using the API.
Category
API
Description
Default RDS backup
Modifies the backup settings of an RDS instance.
Queries the backup settings of an instance.
Views a list of backup sets.
Queries the list of backup tasks for an instance.
Data Disaster Recovery backup
Creates a backup plan.
Configures a backup plan.
FAQ
Q: How do ApsaraDB RDS for MySQL backups affect instance performance?
A: It depends on the RDS edition of your instance as follows:
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.
NoteIn rare cases when the secondary instance is unavailable, backups are performed on the primary instance.
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: How can I disable automatic data or log backups for RDS for MySQL?
A: You cannot disable data backups, but you can disable log backups.
Data Backups (Full): Data backups are mandatory and cannot be turned off. However, you can reduce their cost and resource usage by setting the frequency to the minimum (twice per week) and the retention period to the minimum (7 days).
Log Backups (Incremental): You can disable log backups by toggling the switch off on the Backup Strategy page in the RDS console.
Q: What happens to automatic backups when my pay-as-you-go RDS instance has an overdue payment?
A: Backups will continue to run during the 7-day grace period but will stop afterward.
During the grace period (first 7 days of an overdue payment): Automatic backups continue to run as scheduled.
After the grace period: The instance is suspended, billing stops, and automatic backups are immediately terminated
Q: Why are my RDS for MySQL backup tasks failing?
A: The most common cause of backup failure is a table lock, which occurs when a long-running Data Definition Language (DDL) or
UPDATEstatement is executed during the backup window. To prevent this, avoid running long-running DDL or update queries during your scheduled backup times.Q: Why is my RDS snapshot backup size significantly larger than my actual data size?
A: The size of a snapshot backup is based on the total size of allocated storage blocks, not the logical size of your data.
For instances with cloud disks, RDS uses snapshot backups. If your data writes are fragmented (for example, 3 MB of data is written to several different blocks), the number of non-empty blocks increases. The snapshot captures all of these blocks, resulting in a backup size that can be much larger than your actual data volume.
Q: Where are my RDS backup files stored, and do they consume my instance's disk space?
A: No, backup files do not consume your instance's disk space. RDS stores all data and log backups in a separate, dedicated backup space provided by Alibaba Cloud.
NoteThis backup space is not directly accessible. To download backup files, you must use the RDS console or API.
A free quota is provided for this backup space. You are billed for any usage that exceeds this quota.

