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 |
|
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. |
|
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
- Log on to the PolarDB-X 1.0 console and select a region.
- Click Instances in the left-side navigation pane and click an instance name on the page that appears.
- In the left-side navigation pane, choose .
- 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.
- 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.
- 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
- Log on to the PolarDB-X 1.0 console and select a region.
- Click Instances in the left-side navigation pane and click an instance name on the page that appears.
- In the left-side navigation pane, choose .
- Click the Local Log Settings tab.
- Click Edit. In the Local Binlog Settings dialog box, modify the local log settings.
- After you complete the setting, click OK.
Note The local log settings will be applied to all underlying RDS instances.
Proactive backup
- Log on to the PolarDB-X 1.0 console and select a region.
- Click Instances in the left-side navigation pane and click an instance name on the page that appears.
- In the left-side navigation pane, choose .
- Click Data Backup.
- 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
- Click OK to submit the backup task.
- 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
- Log on to the PolarDB-X 1.0 console and select a region.
- Click Instances in the left-side navigation pane and click an instance name on the page that appears.
- In the left-side navigation pane, choose .
- In the upper right corner, click Data Recovery(Original Clone Instance).
- 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.
- Click Precheck to check whether a valid backup set is available for data restoration. If the precheck fails, the data cannot be restored.
- When the precheck success, in the Verification for Recovery page, click Enable.
- When the precheck success, in the Verification for Recovery page, click Enable to start data restoration.
- 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.