All Products
Search
Document Center

ApsaraDB RDS:Configure a backup retention policy for released instances

Last Updated:Dec 04, 2025

RDS for MySQL lets you retain backups after an instance is released. Before you release an instance, you can configure a retention policy for its backup files. After the instance is released, its backup files are retained for the long term. This feature helps prevent data loss that can result from accidental operations. You can also download these retained backup files from the RDS console or restore them to a new instance.

Typical scenarios

  • Recover from accidental operations: If you accidentally release an important RDS for MySQL instance, you can use the retained backup files to quickly recover your data and prevent data loss.

    Note

    For RDS for MySQL cloud disk instances purchased on or after February 1, 2024, the default backup retention policy for released instances is Latest. For instances with Premium Local SSDs, the default policy is Do Not Retain. You must configure the policy manually.

  • Secure backups: To ensure data security, you can configure a backup policy for released instances in advance. If an instance is released due to a malicious attack or another unexpected event, you can still recover data from its backup files.

  • Data migration: When you migrate data from one RDS for MySQL instance to another, you may not want to release the source instance immediately. You can choose to retain the backups of the released instance. If a problem occurs during the migration, you can use the backups to roll back to the original state.

Limits

This feature is not supported for RDS for MySQL instances that use Premium Local SSDs and run on RDS Enterprise Edition.

Notes

After an RDS for MySQL instance is released, the display of its retained backup files on the Backups > Backups for Deleted Instances page may be delayed. The files are typically displayed within 30 minutes after the instance release task is complete.

Billing

If your RDS instance is deleted, the backup files of the RDS instance are retained free of charge within seven days. After the 7-day retention period elapses, you are charged for the storage of the backup files based on the pay-as-you-go billing method. The following tables describe the unit prices. The following tables describe the unit prices.

Unit price of the storage for the retention of backup sets for a deleted RDS instance that uses Premium Local SSDs

Type

Region

Unit price (USD per GB-day)

Public cloud

China (Hangzhou), China (Beijing), China (Shanghai), China (Shenzhen), China (Qingdao), China (Zhangjiakou), China (Hohhot), China (Chengdu), China (Heyuan), China (Ulanqab), and China (Guangzhou)

0.00058

China (Hong Kong), Singapore, US (Silicon Valley), Germany (Frankfurt), Indonesia (Jakarta), Philippines (Manila), and Thailand (Bangkok)

0.00067

Japan (Tokyo), South Korea (Seoul)

0.0007

US (Virginia)

0.00062

Malaysia (Kuala Lumpur)

0.00064

UK (London)

0.00065

UAE (Dubai)

0.00072

Unit price of the storage for the retention of backup sets for a deleted RDS instance that uses cloud disks

Region

Unit price (USD per GB-day)

China (Beijing), China (Hohhot), China (Ulanqab), China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), China (Chengdu), China (Qingdao), China (Guangzhou), and China (Zhangjiakou)

0.0009375

China (Hong Kong), US (Silicon Valley), US (Virginia), Singapore, Japan (Tokyo), Germany (Frankfurt), Malaysia (Kuala Lumpur), Indonesia (Jakarta), Philippines (Manila), UK (London), South Korea (Seoul), and Thailand (Bangkok)

0.001125

Note

You cannot purchase storage plans to offset the backup storage fees of deleted RDS instances.

Configure a backup retention policy for released instances

Important
  • For RDS for MySQL cloud disk instances purchased on or after February 1, 2024, the default backup retention policy for released instances is Lastest.

    Storage is free for 7 days after the instance is released. After 7 days, backup storage costs are incurred. To avoid these charges, set the backup retention policy to Do Not Retain.

  • For new RDS for MySQL instances with Premium Local SSDs, the default backup retention policy for released instances is Do Not Retain.

Select a configuration method based on the current state of your instance.

Method 1: Configure the policy when you purchase an instance

This method applies only to new subscription RDS for MySQL instances with Premium Local SSDs. You can set the Backup Retention After Release parameter on the purchase page.

image

Method 2: Configure the policy on the instance details page (before release)

  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, click Backup and Restoration.

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

  4. In the dialog box that appears, set the Retain Backup Files After Instance Release parameter and click OK.

    • Lastest or All: After the instance is released, completed backups are retained based on your selection.

    • Do Not Retain: After the instance is released, no backups are retained. Data cannot be recovered. Use this option with caution.

    Important
    • After the instance is released, the system retains the backup files for the long term based on the configured policy. You cannot specify a retention period.

    • Retained backup files are stored free of charge for 7 days. After 7 days, you are charged. For more information about pricing, see Billing.

    • For more information about how to use backup files retained after an instance is released, see Use backup files from a released instance.

Method 3: Configure the policy on the Backup Management page (after release)

  1. Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Backups. In the top navigation bar, select the region in which the RDS instance resides.

  2. On the Backups for Deleted Instances tab, find the target instance and click Settings in the Retention Policy column.

  3. In the dialog box that appears, set the Data Backup Retention Policy and click OK.

    • Lastest or All: After the instance is released, completed backups are retained based on your selection.

    • Do Not Retain: After the instance is released, no backups are retained. Data cannot be recovered. Use this option with caution.

    Important
    • After the instance is released, the system retains the backup files for the long term based on the configured policy. You cannot specify a retention period.

    • Retained backup files are stored free of charge for 7 days. After 7 days, you are charged. For more information about pricing, see Billing.

    • For more information about how to use backup files retained after an instance is released, see Use backup files from a released instance.

Use backup files from a released instance

After an RDS for MySQL instance is released, its retained backup files are stored on the Backups > Backup for Deleted instances page in the RDS console. You can go to this page to manage the retained backup files.

Method 1: Restore a retained backup to a new RDS instance

Go to the Backups page and click the Backup for Deleted instances tab. Find the target instance and click Restore in the Actions column to restore the backup to a new RDS for MySQL instance.

Note

Method 2: Download and archive a retained backup

Note
  • The download feature is available only for physical backups of RDS for MySQL instances with Premium Local SSDs. Snapshot backups of cloud disk instances cannot be downloaded.

  • Downloading backup files over an internal network is free of charge. You are charged for traffic generated by downloading over the internet. For more information about download methods and internet traffic billing, see Download a backup.

Go to the Backups page and click the Backups for Deleted Instances tab. Find the target instance and click Download in the Actions column. Copy the internal or public endpoint to download the backup.

Related operations

View the backup retention policy

Method 1: View the policy on the instance details page (before release)

Note

This method applies only if the RDS for MySQL instance has not been released. If the instance has been released, use Method 2 to view the policy on the Backup Management 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, click Backup and Restoration.

  3. On the Backup and Restoration page, click the Backup Strategy tab. The current backup retention policy is displayed in the Basic Backup section.

    • Lastest: After the instance is released, the last completed backup is retained.

    • All: After the instance is released, all completed backups are retained.

    • Do Not Retain: After the instance is released, no backups are retained. Data cannot be recovered. Use this option with caution.

    image

Method 2: View the policy on the Backup Management page (after release)

  1. Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Backups. In the top navigation bar, select the region in which the RDS instance resides.

  2. On the Backups of Deleted Instances tab, find the target instance and click Settings in the Retention Policy column.

  3. In the dialog box that appears, the current backup retention policy is displayed.

    • Lastest: After the instance is released, the last completed backup is retained.

    • All: After the instance is released, all completed backups are retained.

    • Do Not Retain: After the instance is released, no backups are retained. Data cannot be recovered. Use this option with caution.

    image

Delete backup files of a released instance (after release)

If you no longer need to retain the backups of a released instance, follow these steps to adjust the retention policy. This helps you reduce or avoid unnecessary storage costs.

  1. Go to the Backups page and click the Backups for Deleted Instances tab.

  2. At the top of the page, select the Region where the instance is located.

  3. In the search box, enter the Asset/Resource Instance ID. If the instance was released a long time ago, you must manually adjust the time range filter on the page to expand the search scope, and then perform the search.

  4. After you find the target instance, click Settings in its Actions column.

  5. In the dialog box that appears, set the instance backup retention policy to one of the following:

    • Lastest: Change the policy from the current All to Lastest to reduce backup storage costs.

    • Do Not Retain: Change the policy from the current All or Lastest to Do Not Retain to avoid future backup storage costs.

    Important

    After you change the setting, the system automatically deletes backup files that are no longer retained based on the new policy. This operation is irreversible. Data cannot be recovered. Use this option with caution.

  6. Click OK.

image

FAQ

What is the backup retention policy for released instances and how do I use it?

The backup retention policy for released RDS for MySQL instances is a key feature that helps you protect and recover data. After you enable this feature, you can retrieve important data from the Backups page in the RDS console, even if an RDS for MySQL instance is accidentally deleted or manually released. You can then download the backups to a local device or restore them to a new RDS for MySQL instance.

My RDS for MySQL instance has been released. Why am I still being charged for backups?

Your RDS for MySQL instance has been released. However, if you enabled the backup retention policy for released instances before you released the instance, the backup files are retained on the Backups page in the RDS console. Backup storage is free for seven days after the instance is released. After this period, you will be charged for the storage.

Backup storage costs are incurred if the retention period exceeds the free 7-day period. These costs are based on the actual storage amount and the region. For more information about billing, see Billing details. If you do not need the backups, you can go to the Backups for Deleted Instances tab and set the retention policy for the destination instance to Do Not Retain. This prevents future backup storage costs.

I never set a backup retention policy for released RDS for MySQL instances. Why am I being billed for this feature after my instance was released?

For RDS for MySQL cloud disk instances purchased on or after February 1, 2024, the backup retention policy for released instances is set to Retain the last backup by default. Because this policy is applied at instance creation, the system automatically retains the last backup of the instance after it is released. You are charged for these backups after the free 7-day retention period expires.

Note

To avoid misunderstandings or unnecessary costs, regularly check the backup policy settings for your instance and adjust them as needed. If you no longer need these backups, you can manually delete the backups of the released instance to save on storage costs.

How do I delete the backup files of a released instance?

If you no longer need the retained backup files and want to avoid backup storage costs, you can delete the backup files of a released instance.

My RDS for MySQL instance has been released. Why are the retained backup sets not yet displayed on the Backups of Deleted Instances page?

After an RDS for MySQL instance is released, the display of its retained backup files on the Backups > Backups for Deleted Instances page may be delayed. The files are typically displayed within 30 minutes after the instance release task is complete.