Restoring a GaussDB Instance to a Specific Point in Time
Scenarios
You can use an instance-level automated backup to restore a GaussDB instance to a specified point in time.
You can restore backup data to the original GaussDB instance, an existing instance, or a new one.
Precautions
- Only instances of version V2.0-2.1 or later can be restored to any point in time. Single-replica instances are not supported.
- Data from the time period of the following operations cannot be restored: nodes are being added to an instance, the instance version is being upgraded, or the instance data is being restored.
- If an instance is faulty or a CN is removed, archive logs cannot be generated, and data from the affected time period cannot be restored.
- If you restore backup data to a new DB instance:
- The DB engine and major version are the same as those of the original DB instance and cannot be changed.
- The administrator password needs to be reset.
- If you restore backup data to the original DB instance, data on the original instance will be overwritten and the original DB instance will be unavailable during the restoration. Additionally, log archiving stops. After the restoration is complete, the Confirm Data Integrity button is displayed. Before clicking Confirm Data Integrity, you can restore data for multiple times. Once data integrity has been confirmed, any logs archived after the point in time data was restored from will be lost, but normal log archiving will be restored.
- When a DB instance is deleted, all archive logs are deleted by default and cannot be retained. After an instance is deleted, it cannot be rebuilt or restored to any point in time.
- Log in to the management console.
- Click
in the upper left corner and select a region and project.
- Click
in the upper left corner of the page and choose .
- On the Instances page, click the name of the target instance to go to the Basic Information page.
- In the navigation pane on the left, choose Backups. On the displayed page, click Restore to Point in Time.
- Set Restoration Method to Create New Instance and click OK.
- The new DB instance must have the same major version as the original instance when it was backed up. For example, backup data can only be restored from version V2.0-1.4.x to version V2.0-1.4.y.
- The storage space of the new instance is the same as that of the original DB instance by default and the new instance must be at least as large as the original DB instance.
- The administrator password needs to be reset.
- The backup media, CPU architecture, OS type and version, instance type (distributed or centralized), deployment model, replica consistency protocol, and transaction consistency settings of the new instance must be the same as those of the original instance to be restored.
- By default, the instance specifications of the new instance are the same as those of the original instance. To change the instance specifications, ensure that the instance specifications of the new instance are at least those of the original instance.
- If there are M-compatible databases in the instance to be restored, the Tables Names in M-compatible Databases parameter of the new instance must be set to the same value as that of the original instance. The default value is Case-sensitive.
- On the displayed page, configure parameters of the new instance and click Create Now.
- View the restoration results.
A new instance that contains the same data as the backup is created. When the instance status changes from Creating to Available, the restoration is complete.
The new instance is independent from the original one.
- Log in to the management console.
- Click
in the upper left corner and select a region and project.
- Click
in the upper left corner of the page and choose .
- On the Instances page, click the name of the target instance to go to the Basic Information page.
- In the navigation pane on the left, choose Backups. On the displayed page, click Restore to Point in Time.
- Set Restoration Method to Restore to Original, select the confirmation check box, and click Next.
- The instance version and node configuration must be the same as those of the original instance when the backup was created.
- Restoring to the original DB instance will overwrite all data on it and cause the DB instance to be unavailable during the restoration.
- You are advised to manually back up data before the restoration.
- If you use a backup created before advanced compression is enabled to restore data to the original instance, you must enable this feature for the instance again.
- Confirm the backup task information and click OK.
- View the restoration results.
On the Instances page, when the instance status changes from Restoring to Available, the restoration is complete. After the restoration is complete, a full backup will be automatically triggered.
After the restoration is complete, check whether the restored data is consistent with the time point to which the data is restored. If they are consistent, click Confirm Data Integrity on the Backups page. Before confirming data integrity, you can restore data for multiple times. Once data integrity has been confirmed, any logs archived after the point in time data was restored from will be lost, but normal log archiving will be restored.
- Log in to the management console.
- Click
in the upper left corner and select a region and project.
- Click
in the upper left corner of the page and choose .
- On the Instances page, click the name of the target instance to go to the Basic Information page.
- In the navigation pane on the left, choose Backups. On the displayed page, click Restore to Point in Time.
- Set Restoration Method to Restore to Existing, select the confirmation check box, select an existing instance, and click Next.
- Restoring data to an existing instance will overwrite all data on it and cause the instance to be unavailable during the restoration.
- You are advised to manually back up data of the selected instance before the restoration.
- If there are M-compatible databases in the instance to be restored, the Tables Names in M-compatible Databases parameter of the target instance must be set to the same value as that of the original instance. The default value is Case-sensitive.
- The backup media, CPU architecture, OS type and version, instance type (distributed or centralized), deployment model, replica consistency protocol, transaction consistency, resource specifications, and failover priority settings of the selected instance must be the same as those of the original instance to be restored.
- An existing instance cannot be selected as the restoration target if it is currently undergoing a full or differential backup. If the backup is not required, you can stop it before proceeding with the restoration.
- Confirm the backup task information and click OK.
- View the restoration results.
On the Instances page, when the instance status changes from Restoring to Available, the restoration is complete. After the restoration is complete, a full backup will be automatically triggered.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.