Full Backup

更新时间:
复制 MD 格式

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

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

  2. In the navigation pane on the left, select Backup and Recovery.

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

How to distinguish between basic and advanced backup policy pages?

  • Basic backup policy page (not upgraded)

    • The page includes a Basic Backup section.

    • Clicking the Edit button displays parameters directly in a form.

    This section includes the following parameters: Full Backup Retention Period, Full Backup Start Time, Full Backup Cycle, Next Scheduled Backup Time, Log Backup, Log Backup Retention Period, High-Frequency Incremental Backup, Point-in-Time Restore, Fast Restoration for Individual Databases and Tables, and Retain Backup Files After Instance Release.

  • Advanced backup policy page (after upgrade)

    • The top of the page has MySQL and Level-1 Backup tabs.

    • Circular icons with numbers appear in the middle. Click one to open the parameter settings page.

    • Supports advanced features such as sparse backup.

    On the Backup Policy tab, the page is divided into a Data Source area on the left and a Fast Storage Pool area on the right. Data flows from the MySQL data source through numbered backup nodes to the Level-1 Backup in the fast storage pool.

Note

How to upgrade to the advanced edition?

If you are using the basic interface but want advanced features (such as sparse backup), look for a link labeled “Upgrade to Advanced Edition” on the page. Some regions now support upgrading the backup policy page to the advanced edition. After upgrading, the backup policy settings entry point and some parameter configuration methods change slightly. Choose the appropriate method based on your interface.

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:

  • Cloud disk instances: 7–730 days.

    Note
    • The 5.7 Basic Series is fixed at 7 days and cannot be changed.

  • Instances with Premium Local SSDs: 7 days or longer.

    • Backups retained for up to 730 days are standard backups.

    • Backups retained beyond 730 days are archive backups, which have lower backup storage costs.

    Note

    If you set a retention period longer than 730 days or select Permanently Retained Before Instance Release, you must also specify how many archive backups to retain—for example, keep the earliest two archive backups each month.

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.

  • Range: 7 to 730 days. Default: 7 days.

  • Must not exceed the full backup retention period.

Note

For RDS Basic Edition instances running MySQL 5.7, this value is fixed at 7 days.

Important

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.

  • Standard: Normal restoration speed for databases and tables.

  • Accelerated: Restores 50%–95% faster than 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

  1. Click OK or Save.

  2. The system immediately triggers a full backup based on the new policy.

  3. Later, check the new backup set in Backup and RecoveryData Backup. After the first successful backup, the system automatically runs subsequent backups according to the new policy.

Manual backup procedure

Perform backup

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

  2. In the upper-right corner of the page that appears, click Backup Instance.

  3. In the Backup Instance dialog box, choose to back up all databases or specific databases and tables, then click OK.

    Note

    For differences between backup methods, see Logical backup, physical backup, and snapshot.

    Instance storage class

    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)

    • Logical Backup > Instance Backup

    Logical Backup > Single-Database 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.

Note
  • 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 Backup and Restoration > Base Backups page. For more information, see Download a Backup.

Related operations

FAQ

  • Q: Does backup affect instance performance?

    RDS edition

    Impact

    High-availability Edition or Cluster 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.

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

    Note

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

Other engines