Updated on 2022-12-08 GMT+08:00

Restoring a DB Instance from a Backup

Scenarios

This section describes how to use an automated or manual backup to restore a DB instance to the status when the backup was created. The restoration is at the DB instance level.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click Service List. Under Database, click Relational Database Service. The RDS console is displayed.
  4. On the Backup Management page, select the backup to be restored and click Restore in the Operation column.

    Alternatively, click the target DB instance on the Instance Management page. On the displayed page, choose Backups & Restorations. On the displayed page, select the target backup to be restored and click Restore in the Operation column.

  5. Select a restoration method and click OK.

    • Create New Instance
      The Create New Instance page is displayed.
      • The DB engine and version are the same as those of the original DB instance and cannot be changed. The database port is 5432 by default and cannot be changed during the restoration.
      • Storage space of the new DB instance is the same as that of the original DB instance by default and cannot be less than that of the original DB instance. The administrator password needs to be reset.
    • Restore to Original
      • If the DB instance for which the backup is created has been deleted, data cannot be restored to the original DB instance.
      • Restoring to the original DB instance will overwrite all existing data and the DB instance will be unavailable during the restoration process.
    • Restore to Existing
      • If the target existing DB instance has been deleted, data cannot be restored to it.
      • Restoring to an existing DB instance will overwrite data on it and cause the existing DB instance to be unavailable.
      • To restore backup data to an existing DB instance, the selected DB instance must be in the same VPC as the original DB instance and must have the same DB engine and the same or later version than the original DB instance.
      • Ensure that the storage space of the selected DB instance is greater than or equal to the storage space of the original DB instance. Otherwise, data will not be restored.

      Select an existing DB instance and click OK.

      If the automated backup policy is enabled, a full backup will be triggered after the restoration is complete. Otherwise, the full backup will not be triggered.

  6. View the restoration result. The result depends on which restoration method was selected:

    • Create New Instance

      A new DB instance is created using the backup data. The status of the DB instance changes from Creating to Available.

      The new DB instance is independent from the original one. If you need read replicas to offload read pressure, create one or more for the new DB instance.

      After the new instance is created, the system will perform a full backup.

    • Restore to Original

      On the Instance Management page, the status of the target existing DB instance changes from Restoring to Available. If the original existing DB instance contains read replicas, the read replica status is the same as the original DB instance status.

      If the automated backup policy is enabled, a full backup will be triggered after the restoration is complete. Otherwise, the full backup will not be triggered.

    • Restore to Existing

      On the Instance Management page, the status of the target existing DB instance changes from Restoring to Available. If the target existing DB instance contains read replicas, the read replica status is the same as the target existing DB instance status.

      If the automated backup policy is enabled, a full backup will be triggered after the restoration is complete. Otherwise, the full backup will not be triggered.