This topic explains how to perform full backups of your database using both automatic and manual methods. It covers how to configure an automatic backup policy and how to initiate an immediate manual backup to meet your data protection and disaster recovery needs.
Scenarios
-
Automatic backup: Use this for routine data protection and disaster recovery. The system automatically performs full backups based on a predefined policy and combines them with log backups to enable point-in-time recovery (PITR). This minimizes data loss in case of unexpected failures.
-
Manual backup: Create an immediate data snapshot before performing high-risk operations such as schema changes (DDL), application upgrades, or data migration. This backup serves as a reliable recovery point. If the operation causes issues, you can quickly roll back to the pre-operation state to ensure business stability and continuity.
Prerequisites
If you are using RDS backup services for the first time, use your Alibaba Cloud account to authorize the Data Disaster Recovery service-linked role (AliyunServiceRoleForDBS).
Billing
Backups within the free quota are not billed. Usage beyond the free quota is billed based on actual consumption. For details about the free quota and pricing, see backup storage costs.
Notes
-
Enabled by default: Data backup (full backup) is enabled by default and cannot be disabled. Backups are retained for at least 7 days, with a minimum frequency of twice per week.
-
Minor engine version restrictions: Instances locked due to the following minor engine versions cannot initiate backups.
-
RDS MySQL 5.1 and 5.5: all minor versions.
-
RDS MySQL 5.6, 5.7, and 8.0: minor versions earlier than 20190815.
Note-
To upgrade your major database version or minor engine version, see Upgrade database version or Upgrade minor engine version.
-
For more information, see How to resolve when instance status shows "Locked".
-
-
Read-only instances: Only support configuring the local log retention policy. They do not support automatic backup policies.
-
DDL operations: Do not run DDL operations during backup. Locked tables may cause backup failure.
-
Avoid peak business hours: Schedule backups during off-peak hours whenever possible.
-
Recovery limitations: If a backup contains more than 50,000 tables, Database/Table Restoration is unavailable. However, the Restore Instance (Previously Clone Instance) feature remains unaffected.
-
Backup limit: Backups cannot be performed if the number of tables exceeds 600,000.
-
Policy modification: Changing the backup policy immediately triggers a full backup.
Perform backups
Automatic backup procedure
Step 1: Go 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 navigation pane on the left, select Backup and Recovery.
-
Click the Backup Policy tab. By default, the console displays the basic backup policy page (not upgraded). If you have upgraded to advanced backup, the console displays the advanced backup policy page (after upgrade).
Step 2: Configure core parameters
The meaning of core parameters remains the same regardless of whether the backup policy is upgraded.
Data backup settings
Data backup (full backup) is enabled by default and cannot be disabled. Backups are retained for at least 7 days, with a minimum frequency of twice per week.
|
Parameter |
Description |
|
Backup cycle |
Minimum: twice per week. For cloud disk instances with high-frequency snapshots enabled, you can set it as frequently as once every 15 minutes. |
|
Backup retention period |
Default: 7 days. Options:
|
|
Backup start time |
Select an off-peak business hour to minimize potential impact on your workload. |
|
Retain backup files after instance release |
Choose whether to retain backup files after releasing the instance. Note
We recommend selecting Latest or All. After releasing the instance, you can download backups for recovery from the Deleted Instance Backups page. For details, see long-term retention backup. |
Log backup settings
Log backup (incremental backup) enables point-in-time recovery (PITR).
|
Parameter |
Description |
|
Log Backup |
Backs up transaction logs for PITR. Enabled by default. |
|
Point-in-time recovery |
Enables recovery to a specific point in time. |
|
Log Backup Retention Period (Days) |
Sets the log backup retention period.
Note
For RDS Basic Edition instances running MySQL 5.7, this value is fixed at 7 days. |
To ensure PITR, extra backup sets are retained beyond the specified log backup retention period.
Example: With the Log Backup Retention Period (Days) set to 7 days, the system retains backup data for 7 to 9 days — the latest full backup from before the 7-day mark plus continuous log backups to cover the gap. You are billed for only one extra full backup and up to one additional week of log backups.
Advanced features (optional)
|
Parameter |
Applicable instances |
Description |
|
Backup within seconds |
Cloud disk instances (High-Availability or Cluster Edition) |
When enabled, snapshot backups complete within seconds. |
|
Increase snapshot frequency |
Cloud disk instances (High-Availability or Cluster Edition) |
Enabling high-frequency snapshot backup shortens the snapshot interval and increases snapshot density. After enabling, you can set backups as frequent as once every N hours or even once every 15 minutes. Note
This feature requires backup within seconds to be enabled simultaneously. If you enable this feature while backup within seconds is disabled, the system automatically enables backup within seconds. |
|
Fast restoration for individual databases and tables |
All instances |
When enabled, generated backups support restoring individual databases or tables without restoring the entire instance. |
|
Fast restoration for individual databases and tables (accelerated) |
Instances with Premium Local SSDs (in select regions) |
Enabling fast restoration for individual databases and tables (accelerated) selects the accelerated speed option. Otherwise, the default is standard speed.
Note
After enabling accelerated restoration, you must also select CDM Billing Method and CDM Retention Period. |
|
Backup encryption status |
Instances with Premium Local SSDs (advanced backup policy) |
Encrypts backup files to enhance data security. |
Step 3: Save and verify
-
Click OK or Save.
-
The system immediately triggers a full backup based on the new policy.
-
Later, check the new backup set in Backup and Recovery → Data Backup. After the first successful backup, the system automatically runs subsequent backups according to the new policy.
Manual backup procedure
Perform backup
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 upper-right corner of the page that appears, click Backup Instance.
-
In the Backup Instance dialog box, choose to back up all databases or specific databases and tables, then click OK.
NoteFor differences between backup methods, see Logical backup, physical backup, and snapshot.
Back up all databases
Back up specific databases and tables
Instances with Premium Local SSDs
Two options:
-
Physical Backup (faster backup and restore than logical backup)
-
Cloud disk instances
Snapshot Backup
Not supported
-
View backup progress
After initiating a backup, the system creates a backup job. On the Task Hub page, filter tasks where Task Type is Manual Backup Instance, and status is either Pending Execution or In Progress to monitor progress. In the Backup Jobs list, confirm that Task Type is Manual Backup Instance, Task Status is Successful, and Progress is 100% to verify completion.
-
The retention period for manual backup sets is independent of the backup policy. You can customize the retention period, which supports 7 to 730 days or permanent retention. If no retention period is specified, manual backup sets are permanently retained by default.
-
Backup sets are displayed only after the backup is complete, and you can download backup files on the page. For more information, see Download a Backup.
Related operations
-
After backup completes, you can download backup files from the page. For instructions, see Download backup.
-
Besides the RDS automatic backup feature described here, you can also use the logical backup feature of Data Disaster Recovery—which supports cross-account backup, single-database or single-table backup, geo-redundancy, and storing backups in OSS—to implement automatic backup for RDS MySQL or self-managed MySQL. For key differences, see Differences between RDS default backup and Data Disaster Recovery.
-
Besides the RDS automatic backup feature described here, RDS also lets you manually back up all databases or specific databases and tables.
-
You can download backups to your local machine or upload them to OSS.
-
You can use data restoration solutions 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 to another region, see cross-region backup.
-
You can manage RDS instance backup policies or configure Data Disaster Recovery backup plans using APIs as follows:
Classification
API
Description
RDS default backup
Modifies RDS instance backup settings.
Queries instance backup settings.
Lists backup sets.
Queries the list of backup jobs for an instance.
Data Disaster Recovery backup
Creates a backup plan.
Configures a backup plan.
FAQ
-
Q: Does backup affect instance performance?
RDS edition
Impact
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: Can I disable data backup or log backup?
A: You cannot disable data backup, but you can reduce its frequency (minimum twice per week) and set the retention period to at least 7 days. You can disable log backup by toggling the switch on the Backup Strategy page. For details, see the tutorial Delete or reduce backups to reduce RDS MySQL backups.
-
Q: Will automatic backups continue after a pay-as-you-go instance becomes overdue?
A: Automatic backups continue within the negative balance threshold (7 days after becoming overdue). After exceeding this 7-day grace period, Alibaba Cloud suspends the instance (service stops) and halts billing. Automatic backups stop immediately. For more information, see Overdue payments.
-
Q: Why do backup jobs sometimes fail?
A: Long-running DDL or update statements during backup can lock tables and cause backup failure.
-
Q: Why is my snapshot backup tens of GB when my data is only a few GB?
A: A single backup file can be larger or smaller than your actual data volume. For cloud disk instances using snapshot backup, a single snapshot backup file can be much larger than your data size. The free backup quota is 200% of the instance storage capacity for cloud disk instances and 50% for instances with Premium Local SSDs.
NoteSnapshot size is calculated based on all non-empty blocks. If writes are scattered (for example, 3 MB of data might occupy 2, 3, or even 4 blocks), many non-empty blocks result, making the snapshot larger.
Therefore, the total size of all backup files shown on the Backup and Restoration page may differ from the displayed backup usage.
-
Q: Do database backup files consume instance disk space?
A: Data backups and log backups are stored in Alibaba Cloud-provided backup storage and do not consume instance storage space.
Note-
Backup storage is not publicly accessible. To download backups, see Download backup.
-
Backup storage includes a free quota. Charges apply beyond this quota. For details, see backup storage costs.
-