Help Center> GaussDB(for MySQL)> User Guide> Data Restorations> Restoring Table Data to a Specific Point in Time
Updated on 2024-05-21 GMT+08:00

Restoring Table Data to a Specific Point in Time

Scenarios

To ensure data integrity and reduce impact on the original instance performance, the system restores the full and incremental data at the selected time point to a temporary instance, exports the tables to be restored, and then restores the tables to the original instance. The time required depends on the amount of data to be backed up and restored on the instance. Restoring tables will not overwrite data in the instance.

Constraints

  • Tables that have foreign keys cannot be restored.
  • Tables that have triggers cannot be restored.
  • If the tables to be restored do not exist at the selected point in time, the restoration will fail.
  • The DB instance cannot be rebooted or deleted, and the instance specifications cannot be modified.
  • The number of tables to be restored must be no more than 20,000. If the number of tables to be restored exceeds 2,000, you can restore the instance to a point in time. For details, see Restoring Instance Data to a Specific Point in Time.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page, choose Databases > GaussDB(for MySQL).
  4. On the Instances page, click the instance name to go to the Basic Information page.
  5. Choose Backups in the navigation pane on the left. On the Full Backups page, choose More > Restore Table above the backup list.
  6. In the displayed dialog box, specify the restoration date, time range, time point, and tables to be restored, and click Next: Confirm.

    • To facilitate your operations, you can search for the tables and databases to be restored.
    • After the restoration is complete, new tables with timestamps as suffixes are generated in the instance. You can rename the new tables. The new table name must be unique. It can contain up to 64 characters. Only letters, digits, underscores (_), hyphens (-), and dollar signs ($) are allowed.
    • Time-specific table: The tables to be restored are read from the latest full backup before the selected point in time. Recent table: The tables to be restored are read from the current point time.
    Figure 1 Restoring tables to a specified point in time
    • If a full backup is performed before your selected point in time, you can select Recent table to view the latest table details.
    • If the database tables to be restored do not exist or are deleted by mistake, you need to log in to the databases and create tables with the same names. Then, the tables to be restored will be displayed when you select Recent table.
    • Only specified tables are restored. Ensure that all tables to be restored are selected.

  7. Confirm your settings and click Restore Now. If you need to modify your settings, click Previous.
  8. On the Instances page, the instance status is Restoring. During the restoration process, services are not interrupted.

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

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