Help Center/ GaussDB/ User Guide/ Data Restoration/ Restoring a Backup File to a GaussDB Instance
Updated on 2025-08-18 GMT+08:00

Restoring a Backup File to a GaussDB Instance

Scenarios

You can use an instance-level automated or manual backup to restore data to the point in time when the backup was created. The restoration is at the DB instance level.

Data can be restored to a new DB instance, an existing DB instance, or the original DB instance.

Precautions

  • Restoration will fail if the instance is in the Abnormal, or Storage full state.
  • GaussDB currently only supports restoration between DB instances running the same major version. For example, backup data can only be restored from version V2.0-1.4.x to version V2.0-1.4.y.
  • In addition to full backups and incremental backups, the system backs up incremental log files to ensure data consistency. It takes some time to back up and upload incremental log files (The time depends on the network and OBS traffic control). Note that the backup completion time does not represent the data consistency point that can be specified when this backup set is used to restore data. (Generally, the data consistency point is within several minutes before the backup completion time.) If you have strict requirements on data consistency after restoration, restore data to a specified point in time.
  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.
  4. In the navigation pane, choose Backups. On the Backups page, locate the backup to be restored and click Restore in the Operation column.

    Alternatively, click the name of the target instance on the Instances page. In the navigation pane, choose Backups. On the Full Backups page, click the Instance Backup tab, and click Restore in the Operation column of the backup to be used for restoration.

  5. 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 storage space for a single shard starts from 40 GB and can be increased at a step of 4 GB.
    • The administrator password needs to be reset.
    • 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.
    • 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.
    • 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.

  6. On the displayed page, configure parameters of the new instance and click Create Now.
  7. 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.

  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.
  4. In the navigation pane, choose Backups. On the Backups page, locate the backup to be restored and click Restore in the Operation column.

    Alternatively, click the name of the target instance on the Instances page. In the navigation pane, choose Backups. On the Full Backups page, click the Instance Backup tab, and click Restore in the Operation column of the backup to be used for restoration.

  5. 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.

  6. Confirm the backup task information and click OK.
  7. 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, an instance-level 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.

  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.
  4. In the navigation pane, choose Backups. On the Backups page, locate the backup to be restored and click Restore in the Operation column.

    Alternatively, click the name of the target instance on the Instances page. In the navigation pane, choose Backups. On the Full Backups page, click the Instance Backup tab, and click Restore in the Operation column of the backup to be used for restoration.

  5. 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 new 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.

  6. Confirm the backup task information and click OK.
  7. 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, an instance-level full backup will be automatically triggered.