You can use Hybrid Backup Recovery (HBR) to back up MySQL databases that are deployed on Elastic Compute Service (ECS) instances. You can also restore the databases based on your business requirements. This topic describes how to back up a MySQL database.

Create a backup plan

After you register a MySQL instance, you must create a backup plan in the HBR console to back up the instance. To create a backup plan, perform the following steps:

  1. Log on to the HBR console.
  2. In the left-side navigation pane, choose Backup > Database Backup.
  3. In the top navigation bar, select a region.
  4. On the Database Backup page, click the MySQL tab.
  5. Click the ECS Database Instance or Local Database Instance tab.
  6. On the ECS Database Instance or Local Database Instance tab, find the MySQL instance for which you want to create a backup plan, and click Back Up in the Actions column.
  7. In the Create Backup Plan panel, perform the following steps:
    1. Set the backup parameters and click Next.
      1. Specify Plan Name.
      2. Select the MySQL instance that you want to back up.
    2. Configure the backup plan and click Next.
      Parameter Description
      Recommended Plan The recommended backup plan. Default value: Typical Plan.
      • Typical Plan: enables the Full Backup and Incremental Backup features.
      • Critical Application: enables the Full Backup, Incremental Backup, and Log Backup features.
      • Customize: enables a custom backup policy.
      Full Backup If you select Full Backup, all the database files in the operating system are backed up. However, you can restore the files to only the points in time at which the files are backed up.

      You can back up files immediately or at a specified time. You can also schedule periodic backups by hour, day, week, or month.

      Cumulative Incremental Backup If you select Cumulative Incremental Backup, all incremental database files in the operating system are backed up. However, you can restore the files to only the points in time at which the files are backed up.

      You can back up files immediately or at a specified time. You can also schedule periodic backups by hour, day, week, or month.

      Notice If your MySQL database (earlier than MySQL 5.5) uses the MyISAM engine, you cannot perform incremental backup for the database. In this case, HBR still performs full backups even if you select Cumulative Incremental Backup for this parameter.
      Log Backup You can back up database logs at a regular interval.

      You can back up database logs immediately or at a specified time. You can also schedule periodic backups by hour, day, week, or month.

      Real-time Backup If you select Real-time Backup, you can back up database logs in real time.
      Before you enable real-time backup, you must complete a full backup. After real-time backup is enabled, database logs are continuously backed up. Therefore, the recovery point objective (RPO) of data backups can be reduced to seconds. During the free trial period, you can perform real-time backups free of charge. After the free trial period expires, you are charged for the storage usage of real-time backups. For more information, see HBR pricing.
      Notice You can create only one backup plan for a single MySQL instance if you enable real-time backup for the backup plan.
    3. Configure the backup settings and click Next.
      Parameter Description
      Concurrent Threads The number of concurrent threads when files are being backed up.
      Retry Time The time interval between two consecutive reconnection attempts if the database is disconnected during backup. Unit: minutes.
      Speed Limit The maximum size of data that is backed up per second. Unit: MB/s.
    4. Configure a backup vault. Click OK.
      If you perform a backup for the first time, you must first create a backup vault. Click Create Vault and specify the Vault Name parameter and other parameters as prompted.
      Notice You can back up an instance to only one backup vault.

What to do next

On the Backup Plan tab, find the backup plan. In the Actions column, you can click buttons to perform the following operations:

  • Edit a backup plan

    If a backup plan cannot meet your requirements, you can click Edit to modify the backup plan.

  • Configure alerts

    You can choose More > Alert Settings in the Action columns and then select a backup alert policy. The following table describes the alert policies.

    Alert policy Description
    Disabled The backup client does not send alert notifications.
    Same as Vault The backup client sends alert notifications in the same way as the backup vault.
    Default The backup client sends alert notifications to the owner of the Alibaba Cloud account by using emails.
    Custom If you select this option, you must select one or more contacts or contact groups. Then, the backup client sends alert notifications to the selected contacts and contact groups.
  • Delete backups

    If you delete a backup, all backup data generated by the backup client is deleted and all backup and restoration jobs that are being performed by the client fail. Before you delete a backup client, make sure that the backup data generated by the backup client is no longer required. In addition, make sure that no backup and restoration jobs are being performed by the backup client.

    You can choose More > Delete Backup in the Actions column and then click OK to delete the backup data that is no longer required.

What to do next

Restore a MySQL database