Облачная платформаAdvanced

Restoring a DB Instance from Backups

Язык статьи: Английский
Перевести

Scenarios

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

When you restore a DB instance from a backup file, the backup file is downloaded from OBS and then restored to the DB instance at an average speed of 100 MB/s.

Function Description

Table 1 Function description

Item

Description

Restoration scope

The entire instance

Instance data after restoration

The instance data after restoration is consistent with that in the full backup used for the restoration.

  • Restoring data to a new instance creates an instance with the same data as that in the backup.
  • Restoring data to the original or an existing instance will overwrite the instance data.

Restoration type

  • Restoration to a new instance
  • Restoration to the original instance
  • Restoration to an existing instance other than the original one

Configurations for restoring to a new instance

  • The DB engine and engine version of the new instance are the same as those of the original instance.
  • The new instance must have at least the same storage space as the original instance.
  • Other parameters need to be reconfigured.

Time required

The time required depends on how much data there is in the instance. The average restoration speed is 100 MB/s.

Constraints

  • If transparent page compression is enabled by specifying attributes in the CREATE TABLE statement for the original DB instance, the restoration may fail due to insufficient storage space.
  • Constraints on restoring data to the original DB instance:
    • 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 passwords, and the DB instance will be unavailable during the restoration.
    • Backups of MySQL 8.0 can be restored only to instances with the same kernel minor version. If an instance has already been upgraded to a higher minor version, backups created before the upgrade cannot be restored to the current instance.
  • Constraints on restoring data to an existing DB instance:
    • Restoring to an existing DB instance will overwrite data and passwords on it and cause the existing DB instance to be unavailable.
    • For MySQL 5.6 and 5.7, select an instance that uses the same engine and the same major version, with an equal or higher minor kernel version than the original instance.
    • For MySQL 8.0, select an instance that uses the same engine and the same major version, with an equal minor kernel version as the original instance.
    • Ensure that the storage space of the selected instance is no less than that of the original instance. Otherwise, the restoration task cannot be delivered.

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 and choose Database > Relational Database Service.
  4. On the Backups page, select the backup to be restored and click Restore in the Operation column.

    Alternatively, click the target DB instance on the Instances page. On the displayed page, choose Backups & Restorations. On the displayed page, select the 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 engine version of the new instance are the same as those of the original instance.
      • The new instance must have at least the same storage space as the original instance.
      • Other settings are the same as those of the original DB instance by default and can be modified. For details, see Buying an RDS for MySQL Instance.
    • Restore to Original
      1. Select the confirmation check box and click Next.
      2. Confirm the information and click OK.
    • Restore to Existing
      1. Select the confirmation check box.
      2. Choose an existing instance and click Next.
      3. Confirm the information and click OK.

  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 of 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, a full backup will be automatically triggered.

    • Restore to Original

      On the Instances page, the status of the instance changes from Restoring to Available. If the DB instance contains read replicas, the read replica status is the same as its status.

      After the restoration is complete, a full backup will be automatically triggered.

    • Restore to Existing

      On the Instances page, the status of the instance changes from Restoring to Available. If the DB instance contains read replicas, the read replica status is the same as its status.

      After the restoration is complete, a full backup will be automatically triggered.