Database Backup (DBS) allows you to physically back up MySQL databases in full backup, incremental backup, and binary log backup modes. This topic describes how to physically back up a MySQL database.

Prerequisites

  • The database to be backed up is a self-managed Linux-based MySQL database, and the database uses one of the following versions of MySQL engines: 8.0, 5.7, 5.6, and 5.5.
    Note DBS supports the following Linux operating systems: Red Hat Enterprise Linux, CentOS, and Oracle Linux 7.
  • A backup gateway is installed on the server where the database to be backed up is deployed. For more information, see Add a backup gateway.

Create a backup schedule

For more information, see Purchase a backup schedule.

Note When you purchase a backup schedule, set the Database Type parameter to MySQL and the Backup Method parameter to Physical Backup.

Procedure

  1. Log on to the DBS console.
  2. In the left-side navigation pane, click Backup Schedules. On the Backup Schedules page, select a region in the upper-left corner.
  3. On the Backup Schedules page, find the ID of the backup schedule that you want to configure and click Configure Backup Schedule in the Actions column.
  4. In the Configure Backup Source and Destination step of the Configure Backup Schedule wizard, configure the backup source and destination. Then, click Next in the lower-right corner of the page.
    Figure 1. Configure physical backup for a MySQL database
    Configure physical backup for a MySQL database
    Section Parameter Description
    N/A Schedule Name

    The name of the backup schedule. DBS generates a backup schedule name. We recommend that you set a descriptive name that is easy to identify. Backup schedule names do not have to be unique.

    Backup Source Information Backup Mode

    The method that is used to back up data. By default, the backup method that you selected when you purchased the backup schedule is used.

    Backup type The type of the backup. Default value: Native physical backup. Valid values:
    • Native physical backup: This is the regular physical backup type.
    • Physical backup dump: This backup type is unavailable.
    Instance Region

    The region where the database that you want to back up is deployed. The backup gateway must reside in the same region.Backup Gateways).

    Backup Gateway The backup gateway that is installed to back up data. For more information about how to install a backup gateway, see Add a backup gateway.
    Database Type The type of the database that you want to back up. Default value: MySQL.
    Address The IP address of the host on which the database is deployed. Default value: 127.0.0.1.
    Port Number The number of the port used to connect to the database that you want to back up. Default value: 3306.
    Database Account The username used to connect to the database that you want to back up.
    Password The password used to connect to the database that you want to back up.
    Backup Destination Information Backup Storage Type The type of storage that is used to back up data. Valid values:
    • DBS Storage (recommended): Backup data is stored in DBS without requiring you to create storage space. You are charged based on the volume of your data that is stored in DBS. For more information about the billing method, see Storage fees.

      To reduce storage costs, we recommend that you use subscription storage plans. For more information, see Use storage plans.

    • OSS For User: You must create a bucket in the Object Storage Service (OSS) console in advance. For more information, see Create buckets.
    Note In this example, set this parameter to DBS Storage (recommended). If you set this parameter to OSS For User, you must set the OSS Bucket Name parameter.
    OSS Bucket Name

    The name of the OSS bucket that you want to use to store data.

    This parameter is displayed only when you set the Backup Storage Type parameter to OSS For User.

    Storage Encryption The method that is used to encrypt the stored data. Valid values:
    • Encrypted (recommended): DBS uses AES-256, one of the advanced encryption standard ciphers, to encrypt the stored data.

      The server-side encryption feature is used in OSS. When you upload an object to a bucket for which server-side encryption is enabled, OSS encrypts and stores the object. When you download the encrypted object from OSS, OSS decrypts the object and returns the decrypted object to you. For more information, see Server-side encryption.

    • Non-encrypted: The backup data is not encrypted.
  5. In the Edit Backup Objects step, Back Up Entire Instance is selected by default. Click Next.
    Note To perform a physical backup, you must back up the entire instance. If you back up an entire instance, the permission data and stored procedures are also backed up. Back Up Entire Instance
  6. In the Configure Backup Time step, set the parameters that are described in the following table. Then, click Next in the lower-right corner of the page.
    Parameter Description
    Full-scale Backup Frequency The frequency of the backup schedule. Valid values: Periodic Backup and Single Backup.
    Note If you set this parameter to Periodic Backup, you must set the Full Data Backup Recurrence, Start At, and Incremental real-time backup parameters.
    Full Data Backup Recurrence

    The days of the week on which DBS runs the backup schedule. Select at least one day of the week.

    Start At

    The start time of the backup, such as 01:00. We recommend that you set a time during off-peak hours.

    Note If a previous full data backup is not finished at the start time of the next backup, DBS skips the next backup.
    Incremental real-time backup

    Specifies whether to enable incremental backup.

    Note If you enable incremental backup, make sure that the binary logging feature is enabled for the database that you want to back up.

    This parameter is displayed only when you set the Full-scale Backup Frequency parameter to Periodic Backup.

    Maximum Concurrent Threads for Full Data Backup

    The maximum number of concurrent threads available for a full data backup. You can set this parameter to adjust the backup speed. For example, reduce the number of backup threads to minimize the impact on the database.

    The maximum number of actual concurrent threads varies based on backup schedule specifications. For more information, see How do I change the maximum backup speed?.

    Read speed limit The limit on the disk I/O. You can set the limit based on your needs. Default value: 0, which indicates that the disk I/O is unlimited.
    Backup network speed limit

    The limit on the network bandwidth. You can set the limit based on your needs. Default value: 0, which indicates that the network bandwidth is unlimited.

    Transaction Log backup interval

    The interval at which incremental backups are performed. DBS performs incremental backups based on your settings. If you set the interval to 10 minutes, DBS performs an incremental backup every 10 minutes.

    This parameter is displayed only when you set the Incremental real-time backup parameter to Enable.

    Enable compression Specifies whether to enable compression during backup. Valid values:
    • Enable (recommended): Data is compressed during backup to reduce storage space.
    • Disable: Data is not compressed during backup.
    Compression algorithm The algorithm that is used to compress data. Default value: GZIP. Valid values:
    • GZIP (default)
    • LZ4

    This parameter is displayed only when you set the Enable compression parameter to Enable.

  7. In the Edit Lifecycle step, configure the lifecycle for full backup data in the Configure Full Data Backup Lifecycle section.
    If you set the Incremental real-time backup parameter to Enable in Step 6, you must configure the lifecycle for incremental backup data. For more information about the lifecycle rules of backup data, see How do I manage lifecycle rules of backup sets?.
  8. After the configurations are complete, click Precheck in the lower-right corner of the page.
  9. If the Precheck Passed message appears, click Start Task.
    Figure 2. Precheck the physical backup of a MySQL database
    Precheck the physical backup of a MySQL database
    Note When the status of the backup schedule changes to Running, the backup schedule takes effect. You can view the backup task on the Backup Schedules page. For more information, see View backup schedules.

What to do next