Data Disaster Recovery allows you to perform cross-region backup, long-term archiving, and distributed backup for PolarDB-X instances.
Prerequisites
The source database must be a PolarDB-X 1.0 instance that uses an ApsaraDB RDS for MySQL instance for storage. The ApsaraDB RDS for MySQL instance must run MySQL 5.x or MySQL 8.x.
Features
|
Feature |
Description |
|
SQL file backup |
DBS performs a logical backup and stores the data as JSON files. |
|
Cross-region backup |
You can back up a PolarDB-X instance to an OSS bucket in a destination region, and restore the data to a PolarDB-X instance in the source region, destination region, or another region. |
|
Long-term archiving |
Backup sets can be retained for up to 10 years. After the retention period expires, DBS automatically transitions the backup sets to Archive Storage. |
|
Backup rate limiting |
Reduces the performance impact of backup tasks on the source database. |
|
Distributed backup |
If you select the Large or a higher specification for your backup schedule, multi-node backup accelerates backups and restores. |
Create a backup schedule
For more information, see Create a backup schedule.
When you purchase a backup schedule, set the data source type to PolarDB-X and the backup method to Logical Backup.
Configure a backup schedule
-
Log on to the Data Management (DMS) console.
-
In the top navigation bar, choose .
NoteIf you use the DMS console in simple mode, move the pointer over the
icon in the upper-left corner of the DMS console and choose . -
Find the backup schedule that you want to configure and click Configure Backup Schedule in the Actions column.
-
On the Configure Backup Source and Destination page, configure the source and destination information, and then click Next.
Category
Parameter
Description
N/A
Backup Schedule Name
The name of the backup schedule. DBS automatically generates a backup schedule name. We recommend that you enter a descriptive name that is easy to identify. Backup schedule names do not need to be unique.
Backup Source Information
Backup Method
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. In this example, Logical Backup is used.
Database Location
Select PolarDB-X Instance.
Instance Region
The region in which the source database instance resides.
Database Type
Select PolarDB-X (formerly DRDS).
PolarDB-X Instance ID
Select the ID of the instance that you want to back up.
Database Name
Enter the name of the database that you want to back up.
Database Account
Enter the database account. The account must have the required permissions to back up the database. For more information, see Account permissions.
Password
The password of the account that is used to connect to the database that you want to back up.
After you enter the username and password of the database account, click Test Connection next to the password to check whether the information about the database that you want to back up is valid. If the specified parameters are valid, the Test Passed message is displayed. If the Test Failed message is displayed, click Check next to Test Failed. Modify the information about the database that you want to back up based on the check results.
Cross-Border Data Transfer Compliance Commitment
Read and select the commitment checkbox.
Backup Destination Information
Backup Storage Type
The storage type for your backup data. The following options are available:
-
DBS Storage (Recommended): You do not need to create a storage space. Backup data is automatically stored in DBS. You are charged based on the amount of data stored in DBS. For more information about billing, see Billable items (DMS).
-
OSS For User: You must create a bucket in the OSS console beforehand. For more information, see Create a bucket in the console.
Note-
This topic uses DBS Storage as an example. If you select User-owned OSS, you must also configure the OSS Bucket Name parameter. Only the Standard storage class for OSS is supported.
-
For large data volumes, consider purchasing a subscription-based DBS storage plan to offset fees for DBS Storage. Subscription plans are more cost-effective than pay-as-you-go plans.
Storage Encryption
Select a storage encryption method. The following options are supported:
-
Encrypted (Recommended): Uses the industry-standard AES-256 algorithm for encryption.
With server-side encryption, OSS encrypts objects upon upload and automatically decrypts them upon download. For more information, see Server-side encryption.
-
Non-encrypted: disables encryption.
-
-
On the Edit Backup Objects page, click Next.
DBS only supports backing up the entire distributed database.
-
On the Configure Backup Time page, configure the backup time and other settings, and then click Next.
Parameter
Description
Full Backup Frequency
The frequency of the backup schedule. Valid values: Periodic Backup and Single Backup.
NoteIf you select Periodic Backup, you must configure the Full Data Backup Recurrence and Start At parameters.
Full Backup Period
The days of the week on which DBS runs the backup schedule. You can select one or more days of a week. Select at least one day of the week.
Start Time
The start time of the backup. We recommend that you set a point in time within off-peak hours. Example: 01:00.
NoteIf a previous full data backup is not finished at the start time of the next backup, DBS skips the next backup.
Incremental Backup
Incremental backup is not supported for PolarDB-X databases.
Maximum Number of Parallel Threads for Full Backup
The maximum number of concurrent threads available for a full backup. You can set this parameter to adjust the backup speed. For example, you can reduce the number of backup threads to minimize impacts on the database.
-
On the Edit Lifecycle page, specify the retention period for full backup data in DBS Storage.
-
After the preceding configurations are complete, click Precheck in the lower-right corner of the page.
-
In the Precheck dialog box, click Start Task after the precheck is passed.
Note-
The backup schedule is active once its Status changes to Running.
-
If the backup schedule encounters an error, identify and fix the issue promptly. For more information, see How do I fix an abnormal DBS backup schedule?. If the issue persists after you follow the suggestions, join the DBS customer support group on DingTalk (group ID: 35585947) for assistance.
-
Restore data
-
Log on to the Data Management (DMS) console.
-
In the top navigation bar, choose .
NoteIf you use the DMS console in simple mode, move the pointer over the
icon in the upper-left corner of the DMS console and choose . On the Backup Schedules page, find the backup schedule that you want to manage and click Manage in the Actions column.
On the Configure Task page, click Restore Database in the upper-right corner.
-
On the Set Time Restored To page, configure the following parameters and click Next.
Category
Parameter
Description
N/A
Task Name
The name of the restore task. DBS automatically generates a task name. We recommend that you specify a name that can help you identify the task. Task names do not need to be unique.
Set Time Restored To
Restorable Time Range
The time range from the point in time when the first full backup set is created to the point in time when the latest full backup set is created. The database can be restored to a point in time within the time range.
Selected Restore Point in Time
Select the point in time to which you want to restore the database. The time must be within the restorable time range. You can select the completion time of any full backup within this range.
Destination Database
Database Location
The location of the database that you want to back up. Select PolarDB.
Instance Region
Select the region of the destination instance.
Database Type
The type of the source database. Select PolarDB for PostgreSQL.
PolarDB-X Instance ID
Select the target instance ID. Because restoring data to the source PolarDB-X instance may overwrite the data in the original database, we recommend that you restore the backup data to a new PolarDB-X instance.
Database Name
Enter the name of the destination database to which you want to restore the backup data.
Database Account
Enter the account of the destination database instance. The account must have read and write permissions on the destination database.
Password
The password of the account that is used to connect to the database that you want to back up.
Cross-Border Data Transfer Compliance Commitment
Read and select the commitment checkbox.
-
On the Configure Objects to Restore page, configure the following parameters and click Precheck in the lower-right corner.
Parameter
Description
Conflict Handling
Select a method for Conflict Handling. Options include Fail When Object with the Same Name Exists and renaming the object upon conflict.
Objects to Restore
In the Source Database Objects list, select the databases or tables that you want to restore and move them to the Selected Database Objects list.
NoteYou can restore individual tables or databases to reduce the amount of restored data and shorten the recovery time objective (RTO).
-
On the Configure Objects to Restore page, configure the following parameters and click Precheck in the lower-right corner.
Parameter
Description
Conflict Handling
The default setting for Conflict Handling is Rename if an object with the same name exists. For example, if a table with the same name exists when the
job_infotable is restored, the system renames the new table tojob_info_dbs_<Restore Task ID>_<Timestamp>.Objects to Restore
In the Source Database Objects list, select the databases or tables that you want to restore and move them to the Selected Database Objects list.
NoteSome databases support restoration at the single-table or single-database granularity. This helps reduce the amount of restored data and shorten the recovery time objective (RTO). For more information about the supported restoration granularity, see Supported databases and features.
-
In the Precheck dialog box, click Start Task after Precheck Passed appears.
You can view the restoration progress on the Restore Tasks tab.
NoteRestoration time depends on the backup schedule's specifications and the database size. The higher the specifications, the faster the restoration. For more information, see Performance test results of logical and physical backups.