This topic describes how to restore data for an RDS for PostgreSQL instance in different scenarios.
Scenario 1: Restore a released instance
Recycle Bin: Go to the Recycle Bin page and select the region. If the instance is in the recycle bin, you can rebuild it.
-
An RDS for PostgreSQL instance is moved to the recycle bin after it is manually released, expires, or is refunded. However, this does not apply in the following situations:
-
The instance is refunded or manually released within seven days of its creation.
-
The instance is a pay-as-you-go instance and is automatically released due to an overdue payment in your Alibaba Cloud account.
-
The instance is a read-only instance.
-
-
RDS for PostgreSQL 9.4 instances are no longer available for purchase. You cannot use this feature to rebuild instances that run PostgreSQL 9.4.
Scenario 2: Restore data that was accidentally deleted or modified
|
Solution |
Restoration point in time |
Restoration scope |
Restoration destination |
Restoration speed |
|||||
|
Any point in time |
Point in time of the backup set |
All databases and tables |
Partial Databases |
Partial tables |
To a new RDS instance |
Restore to the original RDS instance |
Restore to another existing RDS instance |
||
|
✔️ |
✔️ |
✔️ |
❌ |
❌ |
✔️ |
❌ |
❌ |
Slow |
|
|
✔️ |
✔️ |
✔️ |
✔️ |
❌ |
❌ |
✔️ |
✔️ |
Fast |
|
-
Restoring to a new RDS instance: To use the new instance temporarily, you can restore data to a new pay-as-you-go instance. After you migrate the data to the original instance, release the new instance to reduce costs.
-
Restoring to the original RDS instance: This restoration method does not overwrite the data on the original instance.
-
To restore specific tables, see Restore data from a logical backup file using pg_restore.
Other scenarios
-
To restore data across regions, see Cross-region data restoration.
-
To restore data to a self-managed database, see Restore data from a CSV or SQL file of an RDS for PostgreSQL instance to a self-managed database.