Updated on 2025-09-11 GMT+08:00

PITR: Restoring Databases or Tables to a Point in Time

Scenarios

RDS allows you to restore databases or tables using point-in-time recovery (PITR). This ensures your data integrity and minimizes impact on the original instance performance. You can select databases or tables and restore them to a specified point in time. During database or table PITR, RDS downloads the most recent full backup before that point in time from OBS and restores it to a temporary DB instance, and then replays WAL to that point in time on the temporary instance. After that, data on the temporary instance is written to the target databases or tables of the original instance. The time required depends on how much data needs to be restored.

The time required depends on the amount of data to be restored on the DB instance. Restoring databases or tables will not overwrite data in the DB instance. You can select the databases or tables to be restored.

RDS for PostgreSQL supports restoration of databases or tables of only one DB instance at a time.

Constraints

  • Take care when restoring tables. Improper operations can cause instance or service exceptions.
  • To prevent restoration failures and impact on original data, table-level restoration removes foreign key constraints, inheritance relationships, partition relationships and triggers, and renames indexes and associated sequences. Database-level restoration does not restore subscriptions.
  • Table PITR can only restore child tables of partitioned tables. The main table cannot be restored.
  • Table PITR can restore a maximum of 2,000 tables for a single instance at a time. If the number of tables to be restored exceeds 2,000, you can restore the entire instance to a point in time. For details, see PITR: Restoring a DB Instance to a Point in Time.
  • Database PITR can restore a maximum of 2,000 databases for a single instance at a time, and the total number of objects in all the databases cannot exceed 20,000. If you want to restore more databases or tables at a time, you can restore the entire instance using PITR. For details, see PITR: Restoring a DB Instance to a Point in Time.
  • During a database or table PITR, DB instances and read replicas cannot be rebooted or deleted, and their instance specifications cannot be modified.
  • In a database or table PITR, the database or table information to be restored is read from the latest full backup before the selected time point. You can select any time point within the restorable time period. Therefore, a database or table can be restored to the earliest full backup time point when its information exists.
  • If there is no backup data about the specified tables at the point in time, the restoration will still be completed, but no data of the tables is restored.
  • RDS for PostgreSQL Enhanced Edition does not support database or table PITR.

Prerequisites

After the restoration, a new database or table will be generated in the DB instance. Ensure that the DB instance has sufficient storage space for the generated database or table.

Restoring Databases or Tables of a DB Instance

  1. Log in to the management console.
  2. Click in the upper left corner and select a region.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. On the Instances page, click the target instance name to go to the Overview page.
  5. In the navigation pane on the left, choose Backups & Restorations.
  6. In the upper right corner of the page, choose Restore to Point in Time > Restore Databases or Tables.
  7. Specify restoration information and click Next: Confirm.

    • To facilitate your operations, you can search for the databases or tables to be restored.
    • After the restoration is complete, new databases or tables with timestamps appended as suffixes to original database or table names are generated in the DB instance. You can rename the new databases or tables.
    • The new table name must be unique and consist of 1 to 64 characters. Only letters, digits, underscores (_), hyphens (-), and dollar signs ($) are allowed.
    • Databases whose names contain periods (.) cannot be restored.
    • To prevent data loss, new databases with unique names must be specified for database PITR.
    • Database PITR can restore a maximum of 2,000 databases for a single instance at a time, and the total number of objects in all the databases cannot exceed 20,000.
      Figure 1 Restoring databases or tables to a point in time

  8. On the displayed page, confirm the information and click Submit.
  9. On the Instances page, check that the DB instance status is Restoring. During the restoration, services are not interrupted.

    You can also view the progress and result of restoring databases or tables to a specified point in time on the Task Center page.

    After the restoration is successful, you can manage data in the databases or tables as required.

  • Data is restored at an average speed of 20 MB/s.
  • Restoring databases or tables to a specified point in time does not affect new data. The restored database or table is a temporary database or table with a timestamp suffix. You can manage the data in the temporary database or table as required.

Follow-up Operations

After the restoration is successful, you can log in to the DB instance for verification.