PolarDB supports data backup and redo log backup. Backing up data is a process of creating a backup set (snapshot) of all data on a cluster at a certain point in time. Backing up redo logs is a process of recording the new data after a backup set is created. You can configure policies for data backup and redo log backup. For example, you can specify the backup method, the retention periods of data backup files and log backup files, and the storage location.
Parameters in the Data Backup section
If your cluster is of Enterprise Edition and uses the PSL4 or PSL5 storage type, data backup are categorized into level-1 backup and level-2 backup based on the storage location. Data backup policies are categorized into level-1 backup policy and level-2 backup policy.
Backup method
Parameter
Description
Level-1 Backup
Backup Method
The backup method that determines the frequency of automatic data backups. You can select Standard Backup (at specified intervals) or High-frequency Backup.
Standard Backup (at specified intervals): performs automatic backup once on each of the specified days of the week. You can set the backup cycle and start time for automatic data backup.
NoteTo prevent data loss, automatic backup must be performed at least twice a week.
Automatic backup files cannot be deleted.
High-frequency Backup: performs multiple automatic backups within 24 hours. This backup method increases backup frequency to speed up data restoration in PolarDB.
You can configure the system to perform a backup once every two, three, or four hours. The first backup is created two hours after you configure the backup policy regardless of the backup frequency you specify.
The system retains all backups files that are created by this backup method within the last 24 hours. For backup files that are created earlier than the previous 24 hours, the system permanently retains only the first backup that is created after 00:00 every day and deletes the rest.
For example, if you specify a backup frequency of every 4 hours at 08:00 on March 1, the system automatically creates the first backup within 4 hours from 08:00 to 12:00 on March 1. Then, the system continues to create a backup every 4 hours.
If the current time is 16:00 on March 4, the following backups are retained:
The backups created within the last 24 hours (from 16:00 on March 3 to 16:00 on March 4).
The backup created between 00:00 and 4:00 on March 3.
The backup created between 00:00 and 4:00 on March 2.
The backup created between 08:00 and 12:00 on March 1.
Then, 4 hours later (at 20:00) on March 4, the following backups are retained:
The backups created within the last 24 hours (from 20:00 on March 3 to 20:00 on March 4).
The backup created between 00:00 and 4:00 on March 3.
The backup created between 00:00 and 4:00 on March 2.
The backup created between 08:00 and 12:00 on March 1.
Backup Cycle
The days of the week on which automatic data backups are performed.
NoteThis parameter is required only when Standard Backup is selected.
Backup Start Time
The time range within which automatic data backups are performed.
NoteThis parameter is required only when Standard Backup is selected.
Backup Frequency
The interval at which automatic backups are performed. Valid values: Last 24 Hours, Every 2 Hours, Last 24 Hours, Every 3 Hours, or Last 24 Hours, Every 4 Hours.
NoteThis parameter is required only when High-frequency Backup is selected.
Backup Retention Period
The retention period of level-1 backups.
NoteBy default, level-1 backup is enabled. The default retention period of level-1 backups is 7 days.
The valid values of the retention period are 3 to 14 days.
Level-2 Backup
Switch for Level-2 Backup
Specifies whether to enable the level-2 backup feature.
NoteBy default, the level-2 backup feature is disabled. If you enable the feature, you are charged additional fees. You can delete backup files to reduce costs. For more information about the pricing of level-2 backup, see Billing rules of backup storage that exceeds the free quota.
Backup dumping rule: When level-2 backup is enabled, the system dumps the first backup created on the days selected for the Backup Cycle parameter.
When level-2 backup is enabled, backups are dumped only when the conditions in the backup dumping rule are met.
Backup Method
Valid values: Same-region Backup and Cross-region Backup.
NoteBy default, Same-region Backup is selected.
If you select both Same-region Backup and Cross-region Backup, two copies of the backup data are dumped.
Backup Cycle
The days on which level-2 backups are performed.
NoteYou can only select the days specified in the Backup Cycle parameter for level-1 backups.
Same-region Backup and Retention
The retention period of same-region backups.
NoteLevel-2 backups can be retained for 30 to 7,300 days.
If you want to retain level-2 backups for a long period of time, select Long-term Retain Backups before Cluster Deletion. After you select this option, you cannot specify the retention period of level-2 backups.
Destination Backup Region
The region in which the backup data is to be stored.
Cross-region Backup and Retention
The retention period of cross-region backups.
NoteLevel-2 backups can be retained for 30 to 7,300 days.
If you want to retain level-2 backups for a long period of time, select Long-term Retain Backups before Cluster Deletion. After you select this option, you cannot specify the retention period of level-2 backups.
Parameters in the Log Backup section
When you configure a redo log backup policy, you must specify the retention period of redo logs.
Parameter | Description |
Backup Method | Valid values: Same-region Backup and Cross-region Backup. Note
|
Same-region Backup and Retention | The retention period of same-region log backups. Note
|
Destination Backup Region | The value of the parameter is the same as the value of the Destination Backup Region parameter for level-2 backup. You do not need to specify this parameter. |
Cross-region Backup and Retention | The retention period of cross-region backups. Note
|
Parameters in the General section
You can configure a backup retention policy that applies when you delete a cluster.
Parameter | Description |
When Cluster Is Deleted | The backup retention policy that applies when you delete a cluster.
Note
|
Procedure
Log on to the PolarDB console.
In the upper-left corner, select the region in which the cluster is deployed.
In the left-side navigation pane, click Clusters.
Find the cluster and click its ID.
- In the left-side navigation pane, choose .
On the Backup Policy Settings tab, click Modify.Modify
In the Backup Policy Settings dialog box, configure the parameters in each section.
If your cluster is of Enterprise Edition and uses the PSL4 or PSL5 storage type, data backup are categorized into level-1 backup and level-2 backup based on the storage location. You must configure the parameters in the level-1 Backup, level-2 Backup, Log Backup, and General sections.
In the message that appears, click OK.
Related API operations
Operation | Description |
Queries the backup policy of a specified PolarDB cluster. | |
Modifies the backup policy of a specified PolarDB cluster. |