The fast restoration feature for individual databases and tables is supported for ApsaraDB RDS for PostgreSQL instances. This feature allows you to restore specific databases to the original ApsaraDB RDS for PostgreSQL instance by backup set or point in time. This feature can be used in scenarios when accidental operations are performed and data needs to be quickly restored or when historical data needs to be analyzed.
Feature description
Item | Description |
Restoration range | Specific databases on an RDS instance. Note The restoration range varies based on data backup retention period, log backup retention period, and the point in time at which you enable the fast restoration feature for individual databases and tables of your RDS instance. The maximum retention period is 730 days for both data backup files and log backup files. For more information, see Back up an ApsaraDB RDS for PostgreSQL instance. You can call the DescribeLocalAvailableRecoveryTime operation to query the time range within which an RDS instance can be restored. For more information, see DescribeLocalAvailableRecoveryTime. |
Restoration speed | The restoration speed varies based on the data volume of the databases, which is approximately 20 Mbit/s. |
Restoration method | You can restore data from backup files or to a specific point in time. Note
|
Prerequisites
Your RDS instance meets the following requirements:
The RDS instance runs PostgreSQL 10, PostgreSQL 11, PostgreSQL 12, PostgreSQL 13, PostgreSQL 14, or PostgreSQL 15.
The RDS instance runs RDS Basic Edition or RDS High-availability Edition.
The RDS instance uses the enhanced SSD (ESSD) storage type.
The RDS instance resides in one of the following regions: China (Chengdu), China (Hangzhou), China (Shanghai), China (Shenzhen), China (Hohhot), and Singapore.
If your RDS instance is created before October 10, 2022 and uses an original architecture, you must perform SLR authorization, update the minor engine version to the latest version, and then restore individual databases and tables of the RDS instance. For more information, see [Notice] SLR authorization is required to create an ApsaraDB RDS for PostgreSQL instance from October 10, 2022 and Update the minor engine version of an ApsaraDB RDS for PostgreSQL instance.
The fast restoration feature for individual databases and tables is enabled. For more information, see Restore individual databases and tables of an ApsaraDB RDS for PostgreSQL instance.
You can go to the Basic Information page of your RDS instance to obtain the preceding information.
Billing rules
The fast restoration feature for individual databases and tables is in public preview. You can use the feature free of charge.
Limits
You can use the fast restoration feature for individual databases and tables to restore individual databases or tables of an RDS instance only to the original RDS instance.
You can use the fast restoration feature for individual databases and tables to restore databases not tables.
You cannot use the fast restoration feature for individual databases and tables to restore views.
Enable the fast restoration feature for individual databases and tables
To use the fast restoration feature for individual databases and table to restore data, you must perform the following steps to enable the feature before you restore data. For more information, see Restore individual databases and tables of an ApsaraDB RDS for PostgreSQL instance. Enabling the feature does not affect your workloads.
- 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 ID of the instance.
In the left-side navigation pane of the page that appears, click Backup and Restoration.
On the Backup and Restoration page, click the Backup Strategy tab.
In the Backup Strategy section of the page that appears, click Edit. In the dialog box that appears, turn on Fast Restoration.
Click Save.
Procedure
- 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 ID of the instance.
In the left-side navigation pane of the page that appears, click Backup and Restoration. On the page that appears, click Restore Individual Database/Table.
NoteIf the Restore Individual Database/Table button is not displayed in the ApsaraDB RDS console, check whether the requirements that are described in Prerequisites are met.
Configure the following parameters.
Parameter
Description
Restore To
Set the value to Current Instance.
Restore Speed
Set the value to Fast.
Restore Method
By Backup Set
By Time: The By Time option is displayed only if the log backup feature is enabled for the RDS instance. The system restores full backup data and then incremental log backup data. You can select a point in time within the log backup retention period. If you want to enable the log backup feature or modify the log backup retention period, follow the instructions provided in Back up an ApsaraDB RDS for PostgreSQL instance.
For example, if the data backup retention period and the log backup retention period of an RDS instance are seven days, you can restore data that is generated within the last seven days. Backup sets that are generated seven days ago are not retained and cannot be used for restoration.
Select the databases that you want to restore and click Ok. You can specify the names of the restored databases based on your business requirements.
NoteYou can select up to 50 databases at a time.
If you restore data to the original RDS instance, the names of the restored databases can be the same as the names of the original databases. The system automatically adds _backup to the end of the name of a restored database. You can also modify the database name.
If you restore data to the original RDS instance, you must check the size of the selected databases and the remaining storage capacity of the RDS instance to ensure that the remaining storage capacity is sufficient for the data restoration.
After the restoration is complete, view the restored databases on the Databases page.
FAQ
What do I do if the "The operation failed. The RDS instance is not in a ready state." error message is displayed when I restore a database or table of my RDS instance in the ApsaraDB RDS console?
Tasks in the ApsaraDB RDS console are executed in sequence. If an ongoing restoration task or incomplete task exists, this error message is displayed when you execute another restoration task at the same time. In this case, wait until the ongoing restoration task or incomplete task is complete and then execute another restoration task.
What do I do if the restored table is empty?
Make sure that the table contains data at the point in time that you selected for the restoration. If the table does not contain data at the point in time that you selected for the restoration, you must select a table that contains data at the selected point in time.
What other methods can I use to restore individual databases and tables of an RDS instance?
You can use Database Backup (DBS) to back up and restore RDS instances and self-managed databases that reside on Elastic Compute Service (ECS) instances. You can also use DBS to download backup sets from the cloud to your computer. For more information, see Overview.
NoteFor more information about other data restoration methods, see Restore data by database or table.
Related operations
Operation | Description |
Queries the time range within which you can restore data of an instance. |