Most ApsaraDB RDS for SQL Server instances are moved to the Recycle Bin after they are released or their subscriptions are canceled. From the Recycle Bin, you can unlock a locked instance, rebuild a released instance from its backup, or permanently destroy an instance.
How it works
When an instance enters the Recycle Bin, its database accounts are released. Billing stops immediately upon entry.
The Recycle Bin supports three operations, each with different time windows and data implications:
| Operation | When to use | Time window | Data outcome |
|---|---|---|---|
| Unlock | Subscription instance locked due to expiration | Within 15 days of locking | Instance restored to normal; no data loss |
| Rebuild | Instance released (expired or manually released) | Within 8 days of release | Data restored to a new instance; original instance ID and endpoint not retained |
| Destroy | Instance expired or has an overdue payment | Any time in Recycle Bin (wait ~10 min after entry) | Instance and all backups permanently deleted |
Check the Last Recoverable Time field on the Recycle Bin page to confirm whether an instance can still be recovered.
Which instances go to the Recycle Bin
Moved to the Recycle Bin:
Pay-as-you-go primary instances that are manually released
Pay-as-you-go primary instances automatically released due to overdue payments
Subscription primary instances that are manually unsubscribed from
Subscription primary instances automatically released after expiration
Not moved to the Recycle Bin:
SQL Server 2008 R2 instances that are manually released or unsubscribed from
Limitations
Instances with transparent data encryption (TDE) enabled cannot be rebuilt and restored from backup data.
Serverless instances cannot be rebuilt and restored.
Unlock an instance
If a subscription instance is locked because it expired, renew and unlock it from the Recycle Bin within 15 days. After 15 days, the instance is released and can no longer be renewed.
After an instance enters the Recycle Bin, its database accounts are released. After you unlock and restore the instance, re-create the database accounts.
Log on to the ApsaraDB RDS console.
In the navigation pane on the left, click Recycle Bin. In the top navigation bar, select the region of your instance.
Find the locked instance and click Unlock.
After renewal completes, the instance is immediately restored to its normal state.
Unlock by adding funds
Check the payment method configured for your Alibaba Cloud account.
Rebuild an instance
After an instance is released—whether a subscription instance expired, or a pay-as-you-go or subscription instance was manually released—its backup is retained for 8 days. Use the Rebuild operation to restore that backup to a new instance.
Starting from the 9th day after the instance is released, its backup is no longer retained and the data cannot be recovered.
Rebuilding restores data to a new instance. By default, the new instance has the same specifications and is created in the same zone as the original. You can select a different zone or instance type. The original instance ID and endpoint are not retained. To avoid interrupting your applications, change the new instance's endpoint to match the original. For more information, see Modify the public and internal endpoints and port numbers.
After the instance backup is deleted, data from the cross-region backup is still retained.
Log on to the ApsaraDB RDS console.
In the navigation pane on the left, click Recycle Bin. In the top navigation bar, select the region of your instance.
Find the instance and click Rebuild.
Destroy an instance
Destroying an instance permanently deletes it and all its backups. This action cannot be undone.
If an RDS instance has expired or has an overdue payment, you can destroy it from the Recycle Bin.151515
Due to system cache latency, an instance must be in the Recycle Bin for about 10 minutes before it can be destroyed. Billing stops as soon as the instance enters the Recycle Bin.
Log on to the ApsaraDB RDS console.
In the navigation pane on the left, click Recycle Bin. In the top navigation bar, select the region of your instance.
Find the instance, click Destroy in the Operation column, and then click OK in the confirmation dialog.
See also
To migrate data from a local backup, upload the local backup to OSS and then import the data to an RDS instance. For other on-premises data migration options, see Overview of data migration solutions.
To manually release a pay-as-you-go instance or unsubscribe from a subscription instance, see Release or unsubscribe from an RDS instance.