Database Backup (DBS) provides features such as remote backup, long-term archiving, and single table restoration for MySQL instances.

Features

Feature Description
Incremental backup DBS uses incremental log streaming to retrieve binlogs in real time for incremental backup.
Full backup Logical backups are stored in the parquet format. Physical backups are stored in the gzip format.
Backup data query DBS allows you to use SQL statements to query backup sets without the need to restore backup data. For more information, see Overview.
Remote backup DBS can back up a MySQL instance to an Object Storage Service (OSS) bucket that is deployed in the destination region. DBS allows you to restore the backup data to a MySQL instance in the source, the destination, or a different region.
Long-term archiving DBS can retain your backup data for up to five years. After the five years, DBS transfers backup sets to Archive Storage.
Fine-grained backup DBS allows you to back up a single table, a single database, multiple databases, or an entire MySQL instance.
Backup speed limit DBS allows you to limit the backup speed to reduce the negative impact of backup operations on database performance.

Create a backup schedule

  1. Log on to the DBS console.
  2. On the Backup Schedules page, click Create Schedule in the upper-right corner to go to the DBS buy page.
  3. Set the parameters as described in the following table and click Buy Now.
    Parameter Description
    Product Type The billing method of the backup schedule that you want to purchase. Default value: Backup Instance (Subscription).
    DBS Region The region where the backup schedule that you want to purchase is deployed.
    Note The selected region is also where DBS built-in storage is deployed. For example, if you select China (Hangzhou) and set the backup storage type to DBS built-in storage (recommended), your backup data is also stored in China (Hangzhou).
    Database Type The engine of the database that you want to back up. Select MySQL.
    Specification The instance type of the backup schedule that you want to purchase. We recommend that you select xlarge for better performance. For more information, see Select an instance type.
    Backup Method The method used to back up data. Valid values: Logical Backup and Physical Backup. In this example, select Logical Backup.
    Storage Size The storage size of the backup schedule that you want to purchase. You do not need to specify the storage size when you purchase a backup schedule. You are charged for the amount of storage space that you actually use. For more information, see Billing methods and billing items. You can also purchase storage plans. Larger discounts are provided for storage plans of higher storage capacities. For more information, see Use storage plans.
    Quantity The number of backup schedules that you want to purchase.
    Duration The validity period of the purchased backup schedule.
  4. On the Confirm Order page, confirm your order information, read and select I have read and agree to Database Backup Agreement of Service in the Terms of Service section, and then click Pay.
  5. After you pay for the order, log on to the DBS console. In the left-side navigation pane, click Backup Schedules to view the new backup schedule.

Configure a backup schedule

  1. Log on to the DBS console.
  2. In the left-side navigation pane, click Backup Schedules.
  3. On the Backup Schedules page, click Configure Backup Schedule in the Actions column corresponding to the backup schedule that you purchased.
    Configure a backup schedule for MySQL data
  4. In the Configure Backup Source and Destination step of the Configure Backup Schedule wizard, set the parameters as described in the following table to configure the backup source and destination.
    Configure a logical backup schedule for MySQL data
    Table 1. Database parameters
    Section Parameter Description
    N/A Schedule Name The name of the backup schedule. DBS generates a backup schedule name. We recommend that you set the backup schedule name to something descriptive that makes it easy to identify. Backup schedule names do not have to be unique.
    Backup Source Information Backup Mode The method used to back up data. By default, the backup method that you selected when you purchased the backup schedule is used. For more information, see Create a backup schedule.
    Database Location The location of the database that you want to back up. Valid values:
    • RDS Instance
    • User-Created Database with Public IP Address <IP Address:Port Number>
    • ECS-Hosted Database
    • Express Connect DB/VPN Gateway/Intelligent Gateway
    • POLARDB Instance
    • No public network IP: Port's self-built database (accessed through the database gateway)
    Note In this example, select RDS Instance. If you select other location types, you must set more parameters.
    Instance Region The region where the instance that you want to back up is deployed.
    RDS Instance ID The ID of the ApsaraDB RDS instance that you want to back up.
    Database Account The account 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. After you enter the database account and password, click Test Connection next to Password to check whether the information about the database that you want to back up is correct. If the specified parameters are valid, the Test Passed message appears. If the Test Failed message appears, click Check next to Test Failed. Modify the information about the database that you want to back up based on the check results.
    SSL Encryption The method used to encrypt the backup data. Valid values:
    • Non-encrypted
    • SSL-encrypted
    Database Type The engine of the database that you want to back up. Default value: MySQL.
    Database gateway instance ID The ID of the database gateway.
    Address The public endpoint used to connect to the database that you want to back up.
    Port Number The port used to connect to the database that you want to back up.
    ECS Instance ID The ID of the Elastic Compute Service (ECS) instance where the database that you want to back up is deployed.
    Peer VPC The virtual private cloud (VPC) where the database that you want to back up is deployed.
    POLARDB Instance ID The ID of the PolarDB for MySQL cluster that you want to back up.
    Backup Destination Information Backup Storage Type The type of storage used to back up data. Valid values:
    • DBS built-in storage (recommended)
    • OSS for user
    Note In this example, select DBS built-in storage (recommended). If you select OSS for user, you must set the OSS Bucket Name parameter.
    Storage Encryption The method used to encrypt the stored data. Valid values:
    OSS Bucket Name The name of the OSS bucket that you want to use to store data.
  5. In the lower-right corner of the page, click Next.
  6. In the Edit Backup Objects step, find the database or table that you want to back up in the Available section. Click the right arrow to add the selected database or table to the Selected section. Then, click Next.
    Note If you back up an entire database, the permission data and stored procedures are also backed up.
  7. In the Configure Backup Time step, set the parameters as described in the following table and click Next.
    Parameter Description
    Full-scale Backup Frequency The frequency of the backup schedule. Valid values: Periodic Backup and Single Backup.
    Note If you select Periodic Backup, you must set the Full Data Backup Recurrence and Full Data Backup Start At parameters.
    Full Data Backup Recurrence The days of the week on which DBS runs the backup schedule.
    Full Data Backup Start At The start time of the backup.
    Note If the time required to complete a full data backup is longer than the backup interval, DBS skips the next backup.
    Real-Time Transaction Log Backup Specifies whether to enable incremental backup.
    Maximum Concurrent Threads for Full Data Backup The maximum number of concurrent threads available for a full data backup.
    Note This value varies with the instance type of the purchased backup schedule.
  8. In the Edit Lifecycle step, configure the lifecycle for a full data backup in the Configure Full Data Backup Lifecycle section.
    Note If you select Enable for the Real-Time Transaction Log Backup parameter, you must configure the backup time for incremental backup data.
  9. After the configuration is complete, click Precheck in the lower-right corner of the page.
  10. If the Precheck Passed message appears, click Start Task.
    Precheck for logical backup of MySQL data

View a backup schedule

  1. Log on to the DBS console.
  2. In the left-side navigation pane, click Backup Schedules.
  3. On the Backup Schedules page, find the backup schedule and click Manage in the Actions column.
  4. On the Configure Task page, view the basic information and running status of the backup schedule.
  5. In the left-side navigation pane, choose Backup Tasks > Full Data to view information about all full data backups.
    View backup sets of MySQL data

Restore a MySQL instance

  1. Log on to the DBS console.
  2. In the left-side navigation pane, click Backup Schedules.
  3. On the Backup Schedules page, find the backup schedule and click Manage in the Actions column.
  4. On the Configure Task page, click Restore Database in the upper-right corner.
  5. In the Set Time Restored To step of the Create Restore Task wizard, set the parameters as described in the following table and click Next.
    Note If this example, backup data is restored to a new instance. If you set the Target database instance type parameter to Use Exists, you must set more parameters. For more information, see Table 1.
    Restore a MySQL instance
    Section Parameter Description
    N/A Task Name The name of the restoration task. DBS generates a task name. We recommend that you set the task name to something descriptive that makes it easy to identify. Task names do not have to be unique.
    Set Time Restored To Time Range Available to Restore The time range available to restore the source instance. DBS displays the available time range.
    Restore To The point in time to which you want to restore the source instance. The value must be within the time range that is specified by the Time Range Available to Restore parameter.
    Configure Destination Database Target database instance type The type of the database instance to which you want to restore data. Valid values: New(Recommend) and Use Exists.
    Database Location The location of the new instance. Default value: RDS Instance.
    Instance Region The region where the new instance is deployed.
    VPC The VPC where the new instance is deployed.
    Note For more information about how to create a VPC, see Create a default VPC network and VSwitch.
    Backup Gateway The backup gateway installed to restore data. For more information about how to install a backup gateway, see Add a backup gateway.
    Note This backup gateway is installed on the new instance.
    DB InstanceClass The instance type of the new instance. The available instance types are displayed in the DBS console.
    Note We recommend that you select the same instance type as the source instance or an instance type with higher specifications.
    Storage space (GB) The storage space of the new instance. The available storage space sizes are displayed in the DBS console.
  6. In the Configure Objects to Restore step, set the parameters as described in the following table and click Precheck.
    Parameter Description
    Conflict Handling The method that is used to handle a name conflict. Valid values: Fail When Object with the Same Name Exists and Rename Object with the Same Name. If you select Rename Object with the Same Name, DBS renames the new table that is to be created by the restoration task. Assume that a table to be restored in the source database and an existing table in the destination database have the same name job_info. The system renames the new table that is restored from the table in the source database in the following format: job_info_dbs_<ID of the restore task>_</Timestamp>.
    Objects to Restore The database or table that you want to restore. Select the database or table that you want to restore in the Available section and click the right arrow to add it to the Selected section.
  7. If the Precheck Passed message appears, click Start Task.