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.
NoteFor 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.
You cannot purchase storage plans to offset the backup storage fees of deleted RDS instances.
Configure a backup retention policy for released instances
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.

Method 2: Configure the policy on the instance details page (before release)
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, click Backup and Restoration.
On the Backup and Restoration page, click the Backup Strategy tab. In the Basic Backup section, click Edit.
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.
ImportantAfter 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)
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.
On the Backups for Deleted Instances tab, find the target instance and click Settings in the Retention Policy column.
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.
ImportantAfter 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.
You can go to the Task List to view the creation progress of the new RDS for MySQL instance. For more information about the parameter settings for new instances, see Create an RDS for MySQL instance.
After the new RDS for MySQL instance is created, connect to it to view the restored data. For more information about how to connect, see Connect to an RDS for MySQL instance.
Method 2: Download and archive a retained backup
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)
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.
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, click Backup and Restoration.
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.

Method 2: View the policy on the Backup Management page (after release)
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.
On the Backups of Deleted Instances tab, find the target instance and click Settings in the Retention Policy column.
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.

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.
Go to the Backups page and click the Backups for Deleted Instances tab.
At the top of the page, select the Region where the instance is located.
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.
After you find the target instance, click Settings in its Actions column.
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.
ImportantAfter 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.
Click OK.
