All Products
Search
Document Center

PolarDB:Backup and recovery

Last Updated:Jul 20, 2023

This topic will introduce two ways and methods of backup and recovery.

Overview

PolarDB-X 1.0 supports instance- and database-level backup and restoration. PolarDB-X 1.0 instances support fast backup and consistent backup in automatic and manual modes. Instance-level restoration refers to restoring data to new PolarDB-X 1.0 and ApsaraDB for RDS (RDS) instances based on existing data backup sets.

Backup methods

PolarDB-X 1.0 provides fast backup and consistent backup. These methods help you restore data based on your business scenarios. The following table compares the two backup methods.

Backup mode

Advantages

Disadvantages

Scenarios

Fast backup

  • Provides fast backup and restoration.

  • Supports restoration based on backup sets and restoration to a specified time point.

  • Supports all instance versions.

Ensures data consistency only within a single RDS instance in sharding scenarios, but does not ensure global data consistency.

Applicable to backup and restoration for routine business.

Consistent backup

Ensures global data consistency in sharding scenarios.

  • Features slow backup and restoration.

  • Supports only restoration based on backup sets, but does not support restoration to a specified time point.

  • Supports only 5.3.8 and later versions.

  • Locks distributed transactions on PolarDB-X 1.0 instances for seconds during backup. During the locking process, the response time (RT) for executing SQL statements includes sub-second jitters. We recommend that you perform consistent backup during off-peak hours.

Applicable to backup and restoration for the financial industry and core online transactions that require high data consistency.

Limits and notes

  • The automatic backup policy of PolarDB-X 1.0 is disabled by default. You must enable it manually. For more information about how to enable it, see Set an automatic backup policy.

  • The log backup feature of PolarDB-X 1.0 depends on underlying RDS instances. The log backup policy configured in the PolarDB-X 1.0 console is automatically synchronized to all the underlying RDS instances. Do not modify the configured policy in the RDS console so that the backup sets keep effective.

  • The backup and restoration feature of PolarDB-X 1.0 depends on log backup. We recommend that you enable the log backup policy by default so that the backup sets keep effective.

  • Do not perform Data Definition Language (DDL) operations during backup, which may lead to instance-level backup and restoration failure.

  • Make sure the RDS instances mounted to a PolarDB-X 1.0 instance are normal during backup so that the backup can succeed.

  • Make sure all tables have primary keys to keep data accuracy during consistent backup and restoration.

  • Affected by the changes to the PolarDB-X 1.0 and RDS inventory, PolarDB-X 1.0 automatically adjusts the instance type and zone during instance-level restoration. You can confirm and change the instance type and zone after the restoration is completed to avoid affecting your business.

  • Instance-level restoration is billed based on the actual billing method and instance type. For more information about the billing method, see PolarDB-X 1.0 specifications and pricing and ApsaraDB for RDS specifications and pricing.

Set an automatic backup policy

  1. Log on to the PolarDB-X 1.0 console and select a region.

  2. Click Instances in the left-side navigation pane and click an instance name on the page that appears.

  3. In the left-side navigation pane, choose Data Recovery > Backup and Recovery..

  4. Click the Backup Policy Tab to view the current automatic backup policy. The backup policy of PolarDB-X 1.0 is disabled by default. If this is the first time you access this page, the backup policy takes effect after you set it.

  5. Click Edit to set the automatic backup policy, as shown in the preceding figure. If you select Database for Backup Level, you must select a database to be backed up.

  6. Set the parameters for the automatic backup policy, and then click OK.

    Note

    A PolarDB-X 1.0 instance does not support log backup, and the configured log backup policy will be applied to all underlying RDS instances.

Configure local logs

  1. Log on to the PolarDB-X 1.0 console and select a region.

  2. Click Instances in the left-side navigation pane and click an instance name on the page that appears.

  3. In the left-side navigation pane, choose Data Recovery > Backup and Recovery..

  4. Click the Local Log Settings tab.

  5. Click Edit. In the Local Binlog Settings dialog box, modify the local log settings.

  6. After you complete the setting, click OK.

    Note

    The local log settings will be applied to all underlying RDS instances.

Proactive backup

  1. Log on to the PolarDB-X 1.0 console and select a region.

  2. Click Instances in the left-side navigation pane and click an instance name on the page that appears.

  3. In the left-side navigation pane, choose Data Recovery > Backup and Recovery..

  4. Click Data Backup.

  5. Set Backup Method and Backup Level. You can select Consistent Backup or Fast Backup for Backup Method. For more information about the differences between the two backup methods, see

  6. Click OK to submit the backup task.

  7. Click the Data Backup Set tab to view the available backup sets. You can view the data backup progress in the Task Progress list in the upper-right corner of the page.

Restore data

  1. Log on to the PolarDB-X 1.0 console and select a region.

  2. Click Instances in the left-side navigation pane and click an instance name on the page that appears.

  3. In the left-side navigation pane, choose Data Recovery > Backup and Recovery..

  4. In the upper right corner, click Data Recovery(Original Clone Instance).

  5. In the dialog box that pops up, select the recovery method and configure other recovery parameters.

    • If you want to restore data by backup set, choose the method as By Backup Set and select a valid backup set in the backup set list.

    • If you want to restore data to a specified time point, choose the method as By Time and select a specified time and recovery level.

  6. Click Precheck to check whether a valid backup set is available for data restoration. If the precheck fails, the data cannot be restored.

  7. When the precheck success, in the Verification for Recovery page, click Enable.

  8. When the precheck success, in the Verification for Recovery page, click Enable to start data restoration.

  9. You can view the restoration progress in the Task Progress list in the upper-right corner of the page. After the data is restored, you can view the restored instance on the PolarDB-X 1.0 Instance Management page.