PolarDB clusters support two types of backup: data backup and redo log backup. A data backup captures a full snapshot of all cluster data at a specific point in time. A redo log backup records all changes made after the most recent snapshot, enabling point-in-time recovery (PITR).
Configure backup policies to control how often backups run, how long they are retained, where they are stored, and what happens to backups when you delete a cluster. The retention period you set defines your recovery window—a 7-day retention period means you can restore to any point within the past 7 days.
Prerequisites
Before you begin, ensure that you have:
A PolarDB cluster with PSL4 or PSL5 storage (required for level-1 and level-2 backup configuration)
Access to the PolarDB console
Configure backup policies
Log on to the PolarDB console.
In the upper-left corner, select the region where the cluster is deployed.
Find the cluster and click its ID.
In the left-side navigation pane, choose Settings and Management > Backup and Restoration.
On the Backup Policy Settings tab, click Modify.
In the Modify dialog box, configure the Data Backup, Log Backup, and General policy parameters, then click OK.
Data backup policy
For clusters using PSL4 or PSL5 storage, data backup is organized into two levels: level-1 backup and level-2 backup.
Log backup policy
Log backup is enabled by default and cannot be disabled. Cross-region log backup is available only when cross-region level-2 backup is enabled.
Shortening the log backup retention period reduces your recovery window. For example, a 7-day retention period means you can perform PITR to any point within the past 7 days. Reducing this period also affects the rollback capability of your cluster.
| Parameter | Description |
|---|---|
| Backup Method | Same-region Backup and/or Cross-region Backup. |
| Same-region Backup and Retention | Retention period for same-region log backups. Range: 3–7,300 days. Select Long-term Retain Backups before Cluster Deletion to retain logs indefinitely. |
| Destination Backup Region | Automatically set to the same region as the level-2 backup destination. No configuration needed. |
| Cross-region Backup and Retention | Retention period for cross-region log backups. Range: 3–7,300 days. Select Long-term Retain Backups before Cluster Deletion to retain logs indefinitely. |
General retention policy
Configure what happens to backups when you delete a cluster.
| Option | Behavior |
|---|---|
| When the cluster is deleted, the cluster data is automatically backed up, and all backup sets of the cluster are retained for a long period of time | Runs an automatic backup and retains all existing backups when the cluster is deleted. |
| When the cluster is deleted, the cluster data is automatically backed up, and the backup set is retained for a long period of time | Runs an automatic backup and retains only the most recent backup when the cluster is deleted. |
| When the cluster is released, all backup sets of the cluster are deleted immediately | Deletes all backups immediately when the cluster is deleted. |
After the cluster is deleted, level-1 backups automatically become level-2 backups. View retained backups on the Cluster Recycle Bin page. For more information, see Restore a released cluster.
If cross-region backup is enabled and you select When the cluster is released, all backup sets of the cluster are deleted immediately, all cross-region backups are also deleted. For the other two options, the configured cross-region retention policies apply.
API reference
| Operation | Description |
|---|---|
| DescribeBackupPolicy | Queries the backup policies of a specified PolarDB cluster. |
| ModifyBackupPolicy | Modifies the backup policies of a specified PolarDB cluster. |