Help Center/ GaussDB(for MySQL)/ User Guide/ Data Restorations/ Restoring Tables to a Point in Time
Updated on 2024-11-06 GMT+08:00

Restoring Tables to a 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 point in time 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 triggers cannot be restored.
  • To prevent restoration failures and impact on original data, table-level restoration removes foreign key constraints.
  • If the tables to be restored are not found 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 a DB Instance to a Point in Time.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > GaussDB(for MySQL).
  4. On the Instances page, click the instance name.
  5. In the navigation pane, choose Backups. On the Full Backups tab, choose More > Restore Table above the backup list.

    Figure 1 Restoring tables to a specified point in time

  6. On the displayed page, set the restoration date, time range, time point, and tables to be restored.

    Figure 2 Setting required parameters
    • 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 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 tables to be restored are not found 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. Click Next: Confirm. On the displayed page, confirm the information about the tables to be restored and click Restore Now.

    If you need to modify your settings, click Previous.

  8. On the Instances page, view the instance status, which 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.