ApsaraDB RDS for MySQL allows you to retain instance backups after an ApsaraDB RDS for MySQL instance is released. Before the RDS instance is released, you can configure the retention policy of backup files. Once the RDS instance is released, the backup files of the RDS instance are retained for a long period of time. This prevents data loss caused by unexpected operations. You can download the retained backup files from the ApsaraDB RDS console or restore the backup files to a new RDS instance.
Scenarios
Data restoration: If you unexpectedly release an RDS instance, you can use the retained backup files to restore the data of the RDS instance to prevent data loss.
NoteIf your RDS instance uses cloud disks and is created on or after February 1, 2024, the Backup Retention After Release parameter of the RDS instance is automatically set to Latest. If your RDS instance uses local disks, the Backup Retention After Release parameter of the RDS instance is automatically set to None. You must manually configure the backup retention policy.
Data security: To ensure data security, you can configure a backup retention policy for your RDS instance before the RDS instance is deleted. This way, you can restore the data of the RDS instance from backup files when the RDS instance is deleted due to attacks or other unknown reasons.
Data migration: You want to migrate the data of your RDS instance to another RDS instance, but do not want to immediately delete the original RDS instance. In this case, you can retain the backup files of the original RDS instance before the RDS instance is deleted. If an error occurs during data migration, the migration can be rolled back at any time.
Limits
The feature is not supported for RDS instances that run RDS Enterprise Edition and use local disks.
Usage notes
When you delete or release an RDS instance, the retained backup files of the RDS instance are displayed on the Backup for Deleted Instances tab of the Backups page with specific latencies. In most cases, after the release task is complete on the background, the retained backup files are displayed within 30 minutes.
Billing rules
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 after instance release
If your RDS instance uses cloud disks and is created on or after February 1, 2024, the Backup Retention After Release parameter of the RDS instance is automatically set to Latest.
If the RDS instance is deleted, the backup files of the RDS instance are retained free of charge for seven days. After the seven-day retention period elapses, you are charged for the storage of the backup files. If you want to prevent the storage cost, you can configure the backup retention policy to None.
When you create an RDS instance that uses local disks, the Backup Retention After Release parameter of the RDS instance is automatically set to None.
You can configure a backup retention policy based on the status of an RDS instance.
Method 1: Configure a backup retention policy when you create the RDS instance
You can use this method only when you create a subscription RDS instance that uses local disks. On the ApsaraDB RDS buy page, you can configure the Backup Retention After Release parameter.
Method 2: Configure a backup retention policy on the instance details page before the RDS instance is released
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, 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, configure the Retain Backup Files after Instance Release parameter and click OK.
Latest: After the RDS instance is released, the most recent backup file of the RDS instance is stored in the ApsaraDB RDS console. We recommend that you set the parameter to this value.
All: After the RDS instance is released, all backup files of the RDS instance are stored in the ApsaraDB RDS console. We recommend that you set the parameter to this value.
Do Not Retain: After the RDS instance is released, no backup files of the RDS instance are retained and the data of the RDS instance cannot be restored. Proceed with caution.
ImportantAfter the configuration is complete and your RDS instance is released, the backup files of the RDS instance are retained for a long period of time. You cannot specify the retention period.
The backup files of the RDS instance are retained free of charge for seven days. After the seven-day retention period elapses, you are charged for the storage of the backup files. For more information, see Billing rules.
For more information about how to use the retained backup files after an RDS instance is released, see Use the retained backup files of an RDS instance after the RDS instance is deleted.
Method 3: Configure a backup retention policy on the Backups page after the RDS instance is released
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 Backup for Deleted Instances tab, find the required RDS instance and click Settings in the Retention Policy column.
In the dialog box that appears, configure the Data Backup Retention Policy parameter and click OK.
Latest: After the RDS instance is released, the most recent backup file of the RDS instance is stored in the ApsaraDB RDS console. We recommend that you set the parameter to this value.
All: After the RDS instance is released, all backup files of the RDS instance are stored in the ApsaraDB RDS console. We recommend that you set the parameter to this value.
None: After the RDS instance is released, no backup files of the RDS instance are retained and the data of the RDS instance cannot be restored. Proceed with caution.
ImportantAfter the configuration is complete and your RDS instance is released, the backup files of the RDS instance are retained for a long period of time. You cannot specify the retention period.
The backup files of the RDS instance are retained free of charge for seven days. After the seven-day retention period elapses, you are charged for the storage of the backup files. For more information, see Billing rules.
For more information about how to use the retained backup files after an RDS instance is released, see Use the retained backup files of an RDS instance after the RDS instance is deleted.
Use the backup files of an RDS instance after the RDS instance is deleted
After an RDS instance is released, you can click the Backup for Deleted Instances tab on the Backups page in the ApsaraDB RDS console to view the retained backup files. You can also manage the retained backup files on the tab.
Method 1: Restore data from the retained backup files to a new RDS instance
On the Backup for Deleted Instances tab, find the required RDS instance and click Restore in the Actions column to restore data from backup files to a new RDS instance.
You can go to the Tasks page to view the creation progress of the RDS instance. For more information about how to configure the parameters to create an RDS instance, see Create an ApsaraDB RDS for MySQL instance.
After you create an RDS instance, you can connect to the RDS instance to view the restored data. For more information, see Connect to an ApsaraDB RDS for MySQL instance.
Method 2: Download and archive the retained backup files
You can download only the physical backup files of RDS instances that use local disks. You cannot download the snapshot backup files of RDS instances that use cloud disks.
If you download backup files over an internal network, no fees are generated. If you download backup files over the Internet, you are charged for the Internet traffic that you use. For more information about the download methods and the fees for the Internet traffic, see Download backup files.
Go to the Backup for Deleted Instances tab, find the required RDS instance, click Download in the Actions column, and then copy the internal URL or external URL to download the backup files.
What to do next
View the backup retention policy after instance release
Method 1: View the backup retention policy on the instance details page before the RDS instance is released
You can use this method only before RDS instances are deleted or released. If your RDS instance is deleted or released, you can use Method 2 to view the backup retention policy of the RDS instance on the Backups 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, click Backup and Restoration.
On the Backup and Restoration page, click the Backup Strategy tab. In the Basic Backup section, view the backup retention policy of the RDS instance.
Latest: After the RDS instance is released, the most recent backup file of the RDS instance is stored in the ApsaraDB RDS console.
All: After the RDS instance is released, all backup files of the RDS instance are stored in the ApsaraDB RDS console.
Do Not Retain: After the RDS instance is released, no backup files of the RDS instance are retained and the data of the RDS instance cannot be restored. Proceed with caution.
Method 2: View the backup retention policy on the Backups page after RDS the instance is released
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 Backup for Deleted Instances tab, find the required RDS instance and click Settings in the Retention Policy column.
In the dialog box that appears, view the backup retention policy of the RDS instance.
Latest: After the RDS instance is released, the most recent backup file of the RDS instance is stored in the ApsaraDB RDS console.
All: After the RDS instance is released, all backup files of the RDS instance are stored in the ApsaraDB RDS console.
Do Not Retain: After the RDS instance is released, no backup files of the RDS instance are retained and the data of the RDS instance cannot be restored. Proceed with caution.
Reduce or delete the backup files of a released RDS instance
If you do not want to retain the backup files of an RDS instance after the RDS instance is released, you can set the Data Backup Retention Policy parameter to Latest or None to prevent or reduce backup storage costs.
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 Backup for Deleted Instances tab, find the required RDS instance and click Settings in the Retention Policy column.
In the dialog box that appears, set the Data Backup Retention Policy parameter to one of the following values:
Latest: If you change the value from All to Latest, backup storage costs are reduced.
None: If you change the value from All or Latest to None, backup storage fees are no longer generated.
ImportantAfter the configuration is complete, the system automatically deletes the backup files that are stored in the ApsaraDB RDS console based on the retention policy. After the backup files are deleted, data can no longer be restored. Proceed with caution.
Click OK.