After you enable advanced backup settings, you can use the sparse backup feature. This topic describes the related concepts and operations.
Overview
After you switch to advanced backup settings on the Backup and Restoration page of a cluster, you can use the sparse backup feature. You can set backup set retention periods on a weekly, monthly, or yearly basis to retain one backup set at long intervals. This helps minimize the recovery time objective (RTO), reduce the number of historical backup sets, and lower storage costs while meeting compliance requirements.
For example, suppose you want to retain one backup set per year for the last 20 years. If you set the retention period for the standard storage pool to 7,300 days and create backups twice a week, you will generate 104 (52 × 2) backup sets per year, resulting in high storage costs. By using a sparse backup policy to retain only one backup set per year, you can significantly reduce storage costs.
Usage notes
-
Historical backup sets do not support sparse backup.
-
After you enable a sparse backup policy for a cluster, you cannot switch back to the standard mode. However, you can modify or disable the sparse backup policy to reduce costs.
-
The billable items and billing method for a sparse backup policy are the same as those for a standard backup policy. For more information, see Billing rules for backup storage.
-
After you enable the sparse backup feature, if no backup is created or successfully dumped on a scheduled retention day, the window for that day is skipped and no backup set is retained. For example, if the sparse backup cycle is set to the 1st of each month and the backup set retention period is 30 days, but the backup fails within the regular backup window on December 1, no backup set is retained for December 1.
Procedure
-
Log in to the PolarDB console,In the navigation pane on the left, click Clusters. Select the Region where the cluster is deployed, and then click the cluster ID to go to the cluster details page。
-
In the left-side navigation pane, choose .
-
On the Backup Policy Settings tab, click Switch to Advanced Backup Settings.
-
In the Tip dialog box that appears, select the checkbox and click OK to go to the backup policy settings page that supports the sparse backup feature. Different storage types support different features. After you adjust the settings, click Save to save the settings.
PSL4/PSL5
Backup type
Description
Level-1 backup
Click the button on the connecting line between PolarDB and Level-1 Backup to configure the level-1 backup policy. For more information, see Configure backup policy settings.
Same-region level-2 backup
Click the button on the connecting line between Level-1 Backup and Level-2 Backup to configure a same-region level-2 backup policy. Level-2 backup supports a sparse backup policy. You can set the backup cycle on a weekly, monthly, or yearly basis and set the number of days to retain backup sets in the standard storage pool. You can also configure multiple dump policies for each cycle.
NoteBackup sets that match multiple rules are retained based on the longest retention period.
Example 1: A backup set created on January 1, 2023 matches both the rule for the 1st of each month (retention period: 30 days) and the rule for January 1st of each year (retention period: 7,300 days). Because the yearly rule has a longer retention period, the backup set is retained for 7,300 days after the dump.
Example 2: A backup set from August 1, 2022 (a Monday) matches both the rule for the 1st of each month (retention period: 365 days) and the rule for every Monday (retention period: 30 days). Because the monthly rule has a longer retention period, the backup set is retained for 365 days.
To ensure that a dump task always has a backup set to dump, when you add a dump policy, the system automatically checks whether a backup task with the same cycle exists. If not, a default backup policy is automatically added and retained for one day on the extreme storage pool.
For example, if the backup task is set to run on Monday, Wednesday, and Friday, and the dump task is set to dump backup sets from the 1st of each month to the standard storage pool, the system cannot guarantee that a backup exists on the 1st of each month. In this case, the system automatically generates a backup policy to create a backup on the 1st of each month and retain it for one day.
If the level-1 backup task uses high-frequency backup or multiple automatic backups are created in one day, each dump policy dumps only the earliest backup set of that day to the standard storage pool.
If the level-1 backup policy is set to create a backup every 4 hours, six backup sets are created at 00:00, 04:00, 08:00, 12:00, 16:00, and 20:00 on January 1, 2023. Based on the preceding backup configuration, only the backup set from 00:00 on January 1, 2023 is dumped to the standard storage pool.
If the level-1 backup policy is set to start at 06:00, a backup set is created at 06:00 on January 1, 2023. At 12:00 on the same day, the start time is changed to 20:00, and another backup set is created at 20:00. Based on the preceding backup configuration, only the backup set from 06:00 on January 1, 2023 is dumped to the standard storage pool.
Same-region log backup is enabled by default and cannot be disabled.
The minimum retention period for a backup set is 30 days, and the maximum is 7,300 days.
Cross-region level-2 backup
Click the button on the connecting line between Level-1 Backup and Cross-region Backup to configure cross-region level-2 backup parameters. You can dump backup sets of different cycles to different regions.
NoteYou can configure cross-region log backup to a destination region only when full backup sets are dumped to that region.
ESSD cloud disk
-
Level-1 backup:Click the button on the connecting line between PolarDB and Level-1 Backup to configure the level-1 backup policy. For more information, see Configure backup policy settings.
-
Cross-region backup:Not supported.
FAQ
-
How do I modify or delete a level-2 backup policy in advanced backup?
Click the button on the connecting line between Level-1 Backup and Level-2 Backup. In the dialog box that appears, find the policy that you want to modify or delete.
-
Modify: Modify the backup cycle, retention period, and whether to retain the backup set long-term.
-
Delete: Click the delete button on the right side to delete the policy.
-