If a subscription ApsaraDB RDS for MySQL instance is automatically released due to expiration or a pay-as-you-go or serverless RDS instance is manually released or automatically released due to overdue payments, the RDS instance is moved to the recycle bin. You can unlock, rebuild, or destroy the RDS instance in the recycle bin.
The system backs up an RDS instance when the RDS instance is being deleted. If the RDS instance is being backed up and the deletion process is not complete, the recycle bin feature is unavailable for the RDS instance.
Sample scenarios
Your subscription RDS instance is locked due to expiration and moved to the recycle bin. To unlock the RDS instance, you can renew the RDS instance within seven days. If you do not renew the RDS instance within seven days, you can only rebuild the RDS instance from the recycle bin and restore the data of the RDS instance to a new RDS instance. For more information, see Rebuild an RDS instance.
Feature description
If you manually release a pay-as-you-go RDS instance or unsubscribe from a subscription RDS instance, or a subscription RDS instance is automatically released upon expiration, the RDS instance is moved to the recycle bin. An RDS instance is not moved to the recycle bin in the following scenarios:
The RDS instance is a pay-as-you-go RDS instance and is automatically released due to overdue payments.
The RDS instance is created in a dedicated cluster or is a read-only RDS instance.
If the RDS instance uses a phased-out instance type and is moved to the recycle bin, you can rebuild the RDS instance from the recycle bin to an RDS instance that uses an available instance type. You can also retain the last backup file of your RDS instance before you release the RDS instance. Then, you can use the backup file to rebuild the RDS instance from the recycle bin to an RDS instance that uses an available instance type.
After the retention period elapses, only the backup files that meet the following conditions are retained:
The RDS instance runs MySQL, PostgreSQL, or SQL Server, and the cross-region backup retention period has not ended. The backup files are retained until the cross-region backup retention period ends. For more information, see Use the cross-region backup feature of ApsaraDB RDS for MySQL, Use the cross-region backup feature of ApsaraDB RDS for SQL Server, and Use the cross-region backup feature of ApsaraDB RDS for PostgreSQL.
The RDS instance runs MySQL, and you have determined to retain the backup files of the RDS instance even after the RDS instance is released. In this case, the backup files of the RDS instance are retained. For more information, see Use the automatic backup feature.
Instance statuses and operation permissions within different time ranges
Subscription RDS instances
For example, your subscription RDS instance expired at 00:00:00 on January 4, 2024, and the RDS instance was released at 00:00:26 on January 11, 2024. In this case, you can renew and unlock the RDS instance within the time range from 00:00:00 on January 4, 2024 to 00:00:26 on January 11, 2024, and rebuild and restore the RDS instance within the time range from 00:00:26 on January 11, 2024 to 00:00:00 on January 19, 2024. After 00:00:00 on January 19, 2024, the RDS instance was destroyed.
Pay-as-you-go RDS instances and serverless RDS instances
Manual release
For example, you manually released your pay-as-you-go RDS instance at 21:38:33 on January 12, 2024. You can restore the pay-as-you-go RDS instance within the time range from 21:38:33 on January 12, 2024 to 00:00:00 on January 20, 2024. After 00:00:00 on January 20, 2024, the pay-as-you-go RDS instance was destroyed.
Locked due to overdue payments
For example, a pay-as-you-go RDS instance was suspended at 21:25:13 on January 5, 2024 due to overdue payments, and was released at 21:38:33 on January 12, 2024. In this case, you can settle the overdue payments and unlock the RDS instance within the time range from 21:25:13 on January 5, 2024 to 21:38:33 on January 12, 2024, and rebuild and restore the RDS instance within the time range from 21:38:33 on January 12, 2024 to 00:00:00 on January 20, 2024. After 00:00:00 on January 20, 2024, the RDS instance was destroyed.
To export data of an RDS instance in the recycle bin, you must unlock the RDS instance or rebuild the RDS instance, export data of the RDS instance, and then release the RDS instance. For more information, see Unlock an RDS instance, Rebuild an RDS instance, and Release or unsubscribe from an ApsaraDB RDS for MySQL instance. For more information about data export, see Export databases.
Some locked RDS instances are read-only. You can execute statements to query data on the RDS instances but cannot export data of the RDS instances. For more information, see What do I do if my ApsaraDB RDS instance is in the Locking state?
Unlock an RDS instance
Unlock a pay-as-you-go RDS instance whose payment is overdue
If your pay-as-you-go RDS instance is locked due to overdue payments, log on to the Billing Management console and verify that a valid payment method is specified for your Alibaba Cloud account.
Renew and unlock a subscription RDS instance
If your subscription RDS instance is locked due to expiration, you can renew the RDS instance in the recycle bin within seven days. If you do not renew the RDS instance within seven days, the RDS instance is released.
Go to the Instances page.
In the left-side navigation pane, click Recycle Bin. In the top navigation bar of the page that appears, select the region of the RDS instance that you want to renew.
Find the required RDS instance and click Unlock in the Operation column to renew the RDS instance.
After the RDS instance is renewed, the RDS instance is immediately restored to normal.
Rebuild an RDS instance
Prerequisites
If the RDS instance uses cloud disks, the network type of the RDS instance must be VPC.
Usage notes
If the Transparent Data Encryption (TDE) feature is enabled for an RDS instance, the backup files of the RDS instance cannot be used to rebuild the RDS instance. For more information, see Configure TDE.
By default, the rebuilt RDS instance uses the same instance type as the original RDS instance and resides in the same zone as the original RDS instance. However, if the instance type of the original RDS instance is no longer available for purchase, you must select an available instance type when you restore the original RDS instance to a new RDS instance. For more information about the historical and available instance types, see Specifications.
After an RDS instance is rebuilt, the data of the original RDS instance is restored to a new RDS instance. However, the new RDS instance does not inherit the ID or endpoint of the original RDS instance. You can change the endpoint of the new RDS instance to the endpoint of the original RDS instance. This way, your applications can connect to the new RDS instance by using the original endpoint. For more information, see View and manage instance endpoints and ports.
When an RDS instance is moved to the recycle bin, the IP address whitelists of the RDS instance become invalid. After the RDS instance is rebuilt and the data of the RDS instance is restored to a new RDS instance, you must create IP address whitelists for the new RDS instance.
Procedure
Go to the Instances page and select the region of the required RDS instance.
In the left-side navigation pane, click Recycle Bin.
Find the required RDS instance and click Rebuild in the Operation column.
Read and select Terms of Service, and click Pay Now.
Click Subscribe. This step is required only for subscription RDS instances.
FAQ
Destroy an RDS instance
If an RDS instance is locked due to overdue payments or expiration, you can destroy the RDS instance in the recycle bin.
After you destroy an RDS instance, only the cross-region backup files of the RDS instance are retained. All regular data backup files, archived backup files, and log backup files of the RDS instance are destroyed. Proceed with caution when you destroy an RDS instance. For more information about cross-region backup files, see Use the cross-region backup feature.
Go to the Instances page.
In the left-side navigation pane, click Recycle Bin. In the top navigation bar of the page that appears, select the region of the required RDS instance.
Find the required RDS instance and click Destroy in the Operation column. In the message that appears, click OK.