All Products
Search
Document Center

Cloud Backup:Restore a MySQL database

更新時間:Dec 03, 2024

After you use Cloud Backup to back up a MySQL database to a backup vault, you can restore the MySQL database based on your business requirements. You can restore the data of the MySQL database to the source MySQL database or another registered MySQL database within the same account in the same region.

Prerequisites

Billing

You are not charged for the restore feature.

Precautions

  • The backup speed and recovery speed of Cloud Backup are obtained in a test environment. The values are provided for reference only. For more information, see Backup speed and recovery speed.

  • If you want to restore data to a new MySQL database, you must register the MySQL database in the Cloud Backup console and make sure that the database is in the Online state.

Create a restore job for the MySQL database

To create a restore job, perform the following steps:

  1. Log on to the Cloud Backup console.

  2. In the left-side navigation pane, choose Backup > Database Backup. In the top navigation bar, select a region. On the Database Backup page, click the MySQL tab. Click the ECS Database Instance or Local Database Instance tab. Find the MySQL database for which you want to create a restore job and click Restore in the Actions column.

    image

  3. In the Create Restore Job dialog box, perform the following steps.

    1. Configure Restore Items and click Next.

      Manually drag the slider for Recovery Point to specify the time to restore the database.image.png

    2. Specify Plan Name for the restore job and start the job immediately. Then, click Next.

      You can only start the restore job immediately. You cannot specify the restoration time.

    3. Configure Restore Config and click Next.

      image.png

      Parameter

      Description

      Retry Time

      The time interval between two consecutive reconnection attempts if the database is disconnected during restoration. Unit: minutes.

      Speed Limit

      The maximum size of data that is restored per second. Unit: MB/s. The value 0 indicates that the speed is unlimited.

      We recommend that you specify a reasonable speed to prevent database performance issues caused by an excessive amount of data restored.

      Forcibly Apply Binlog

      If you select this option, binary logs are forcibly used for data restoration even if an error occurs. Binary logs are crucial to recording internal changes in MySQL databases, including the changes in all data definition language (DDL) and data manipulation language (DML) statements.

      Ignore Permission Table When Binlog Is Applied

      If you select this option, you can prevent denied access to binary logs due to insufficient permissions when you restore logs.

    4. Select a database to which you want to restore the data of the source database and click Create.

      By default, the MySQL database that is last backed up is selected. You can also restore the data to another registered MySQL database.

      image.png

    After you create a restore job, the job automatically starts. On the Restore Plan tab, you can view the created restore job. After the restore job is completed, the job status changes to Completed.image.png

    Then, you can log on to the MySQL database to verify data.

FAQ

What do I do if the status of a MySQL database is Database Offline?