Restoring Specified Databases or Tables to a Point in Time

Updated on 2025-03-19 GMT+08:00

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 from OBS and restores it to a temporary DB instance, and then replays binlogs to the specified 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 at an average speed of 20 MB/s.

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.

Constraints

  • During table PITR, a maximum of 2,000 tables can be restored for one instance at a time.
  • During the PITR, DB instances and read replicas cannot be rebooted or deleted, and their instance specifications cannot be modified.
  • During the 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 restoration time range. Therefore, a database or table can be restored to the earliest full backup time point when its information exists.
  • If a table you selected does not exist at the specified point in time, the table will not be restored.
  • Table-level PITR does not support view restoration. To restore a view, restore the tables involved in the view and create the view again.
  • If a DB instance has more than 20,000 tables, RDS does not collect the database and table metadata at a historical time point for performance purposes. Instead, RDS searches for the database and table information from the current instance for restoration. If the target database and table are not displayed but they do exist at the specified time point, you can create an empty database and table with the same names and restore them.

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.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  3. On the Instances page, click the instance name.
  4. In the navigation pane, choose Backups & Restorations. On the displayed page, click Restore Databases or Tables.
  5. 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.

  6. On the displayed page, confirm the information and click Submit.
  7. 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.

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback