Database Backup (DBS) supports backup and restore for PolarDB-X instances. DBS provides the features of remote backup, long-term archiving, and distributed backup.

Prerequisites

The storage type of the PolarDB-X instance that you want to back up is RDS MySQL. The MySQL version is MySQL 5.x.

Features

Feature Description
SQL file backup DBS uses the logical backup technology to store backup data in JSON files.
Backup data query DBS allows you to use SQL statements to query backup sets without restoring data. For more information, see Use SQL statements to query backup sets.
Remote backup DBS supports backup of a PolarDB-X instance to an Object Storage Service (OSS) bucket in the destination region. DBS allows you to restore the backup data to a PolarDB-X instance in the destination region, source region, or other regions.
Long-term archiving DBS can retain your backup data for up to five years. After the five years, DBS automatically transfers the backup set to Archive Storage.
Backup speed limit DBS allows you to limit the backup speed to reduce the negative impact of backup operations on the database performance.
Distributed backup DBS provides the distributed backup feature for DBS instances of the large or xlarge type. This feature allows you to back up and restore multiple nodes at the same time.

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 DBS instance that you want to purchase. The default billing method is subscription.
    DBS Region The region where the DBS instance that you want to purchase resides. Make sure that the selected region is the same as the region where you want to store the backup data.
    Database Type The type of the database that you want to back up. In this example, select Polardb-x (original DRDS upgrade).
    Specification The type of the DBS instance that you want to purchase. For more information, see Select a DBS instance type.
    Backup Method The mode for backing up data. Only logical backup is supported for backing up PolarDB-X instances.
    Storage Size The storage size of the DBS instance that you want to purchase. You do not need to specify the storage size when you purchase a DBS instance. The storage size is charged in pay-as-you-go mode. You can also purchase a storage plan. A favorable discount is available if you purchase a storage plan with a large size.
    Quantity The number of DBS instances that you want to purchase. Set this parameter based on your actual needs.
    Duration The validity period of the purchased DBS instance. Set this parameter based on your actual needs.
  4. On the Confirm Order page, confirm your order information, read and agree to DBS Agreement of Service by selecting the check box, and then click Pay.
  5. After you pay for the order, log on to the DBS console and click Backup Schedules in the left-side navigation pane to view the new backup schedule.

Configure the 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 target backup schedule 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.
    Section Parameter Description
    None Schedule Name The name of the backup schedule. DBS automatically generates a schedule name. We recommend that you set an informative name for easy identification. You do not need to use a unique schedule name.
    Backup Source Information Backup Mode The mode for backing up data. Only logical backup is supported for backing up PolarDB-X instances.
    Database Location The location of the database that you want to back up. In this example, this parameter is set to Distributed PolarDB-X Instance.
    Instance Region The region where the database that you want to back up resides.
    Database Type The type of the database that you want to back up. In this example, this parameter is set to Polardb-x (original DRDS upgrade).
    PolarDB-X Instance ID The ID of the PolarDB-X instance where the database that you want to back up resides.
    Database Name The name of the database that you want to back up.
    Database Account The username of the account used to connect to the database that you want to back up.
    Password The password of the account 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.
    Backup Destination Information Backup Storage Type The type of the storage that you use to back up data. Valid values:
    • DBS built-in storage
    • OSS for user
    OSS Bucket Name The name of the OSS bucket. This parameter is available only when you set Backup Storage Type to OSS for user.
    Storage Encryption The method that you use to encrypt the stored data. Valid values:
    • Non-encrypted
    • Encrypted
    • KMS Encrypted
  5. In the lower-right corner of the page, click Next.
  6. In the Edit Backup Objects step, click Next.
    Note In the previous step, the Backup Mode parameter is set to Logical Backup. In this step, Backup the entire distributed database is automatically selected for the logical backup mode.
  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.
    Full Data Backup Recurrence The day in a week on which DBS runs the backup schedule.
    Full Data Backup Start At The start time of the backup. If the time taken for 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. The value varies with the specifications of the DBS instance that you purchased when you created the backup schedule.
  8. In the Edit Lifecycle step, configure the lifecycle for a full data backup in the Configure Full Data Backup Lifecycle section.
  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.
    Note When the status of the backup schedule changes to Running, the backup schedule takes effect.

View the 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 target backup schedule and click Manage in the Actions column.
  4. The Configure Task page displays 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.

Restore a PolarDB-X 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 target 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.
    Section Parameter Description
    None Task Name The name of the restore task. DBS automatically generates a task name. We recommend that you set an informative name for easy identification. You do not need to use a unique task name.
    Set Time Restored To Time Range Available to Restore The time range available for restoring backup sets. DBS automatically displays the available time range.
    Restore To The point in time that you want to restore the source database to. The value must be within the time range that is specified by the Time Range Available to Restore parameter.
    Configure Destination Database Database Location The location of the database that you want to restore. In this example, this parameter is set to Distributed PolarDB-X Instance.
    Instance Region The region where the database that you want to restore resides.
    Database Type The type of the database that you want to restore. In this example, this parameter is set to Polardb-x (original DRDS upgrade).
    PolarDB-X Instance ID The ID of the destination PolarDB-X instance that you want to restore the source database to. If you restore the source database to the PolarDB-X instance where the source database resides, the data in the source PolarDB-X instance may be overwritten. We recommend that you restore the source database to another PolarDB-X instance.
    Database Name The name of the database that you want to restore.
    Database Account The username of the account used to connect to the database that you want to restore.
    Password The password of the account used to connect to the database that you want to restore. 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 restore 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 restore based on the check results.
  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 you use to handle a name conflict. Default value: Fail When Object with the Same Name Exists.
    Objects to Restore The database or table that you want to restore. For a PolarDB-X instance, you can only restore an entire database.
  7. If the Precheck Passed message appears, click Start Task.