When an ApsaraDB RDS for PostgreSQL instance is released or expires, it moves to the recycle bin. From there, you can unlock it to restore normal operation, rebuild it to recover data to a new instance, or destroy it to permanently delete it.
Billing stops immediately when an instance moves to the recycle bin.
Which instances go to the recycle bin
| Billing method | Trigger | Goes to recycle bin? |
|---|---|---|
| Pay-as-you-go | Manually released | Yes |
| Pay-as-you-go | Automatically released due to overdue payment | Yes |
| Subscription | Manually unsubscribed from | Yes |
| Subscription | Automatically released after expiration | Yes |
| — | Read-only instance (any billing method) | No |
| — | Serverless instance (any billing method) | No |
Choose an operation
Use the following table to identify the right operation for your situation.
| Situation | Instance state | Operation | Time limit |
|---|---|---|---|
| Subscription instance expired; want to restore it | Locked | Unlock a subscription instance | 7 days from expiration |
| Pay-as-you-go instance locked due to overdue payment | Locked | Unlock a pay-as-you-go instance | Resolve payment to unlock |
| Instance already released; want to restore data to a new instance | Released | Rebuild an instance | 8 days from release |
| Instance already released; want to permanently delete it | Released | Destroy an instance | Available ~10 minutes after entering the recycle bin |
Unlock a subscription instance
If a subscription instance expires and moves to the recycle bin, renew it within seven days to restore it. After seven days without renewal, the instance is permanently released.
Go to the Instances page.
In the left navigation pane, click Recycle Bin. In the top navigation bar, select the region of the instance.
Find the instance and click Unlock in the Operation column.
After renewal, the instance is immediately restored to normal.
Unlock a pay-as-you-go instance
If a pay-as-you-go instance is locked due to overdue payment, log on to the Billing Management console and verify that a valid payment method is set for your Alibaba Cloud account.
Rebuild an instance
When a released instance is in the Released state, its backup data is retained for eight days. During this period, you can rebuild the instance to restore its data to a new instance.
Limitations
You cannot rebuild an instance that uses a phased-out instance type, database version, or storage type. For details, see:
Steps
Log on to the ApsaraDB RDS console.
In the left navigation pane, click Recycle Bin. In the top navigation bar, select the region of the instance.
Find the instance and click Rebuild.
By default, the new instance uses the same specifications and zone as the original. You can also select different specifications or a different zone.
After the rebuild completes, the original instance's data is restored to the new instance. The new instance does not inherit the ID or endpoint of the original instance. To let your applications connect using the original endpoint, change the new instance's endpoint to match. For details, see View and change the endpoints and port numbers of an ApsaraDB RDS for PostgreSQL instance.
For information about overdue payments and their impact, see Overdue payments.
Destroy an instance
Destroying an instance is irreversible. Only cross-region backup files are retained. All regular data backup files, archived backup files, and log backup files are permanently deleted. For information about cross-region backups, see Enable cross-region backups for an ApsaraDB RDS for PostgreSQL instance.
Instances in the Released state can be destroyed. Instances newly moved to the recycle bin cannot be immediately destroyed due to cache synchronization delays — wait approximately 10 minutes before attempting to destroy.
Log on to the ApsaraDB RDS console.
In the left navigation pane, click Recycle Bin. In the top navigation bar, select the region of the instance.
Find the instance and click Destroy in the Actions column.