Advanced backup settings
After you enable advanced backup settings, you can use the sparse backup feature. This topic describes the related concepts and configuration procedure.
Background
This feature lets you set weekly, monthly, or yearly retention periods for backup sets. Retaining specific backups long-term helps improve your Recovery Time Objective (RTO) and meet compliance requirements, while reducing the total number of historical backups to lower storage costs.
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 in a single year, leading to high storage costs. By using a sparse backup policy to retain only one backup set per year, you can significantly reduce your storage costs.
Usage notes
-
The sparse backup feature is in canary release. To use this feature, submit a ticket to request access.
-
The sparse backup feature does not apply to historical backup sets.
-
After you enable a sparse backup policy for a cluster, you cannot switch back to standard mode. However, you can modify or disable the sparse backup policy to reduce costs.
-
The billable items and billing rules for a sparse backup policy are the same as those for a standard backup policy. For more information, see Backup Storage Costs.
-
After you enable the sparse backup feature, if no backup is created or successfully dumped on a scheduled day, no backup set from that day is retained under the policy. For example, you configure a sparse backup policy to run on the first day of each month and set the retention period to 30 days. If the backup fails within the regular backup window on December 1, no backup set is retained for that day.
Procedure
-
Log on to the PolarDB console.
-
In the upper-left corner of the console, select the Singapore (Singapore) region.
-
Find the target cluster and click its ID.
- In the left-side navigation pane, choose .
-
On the Backup Policy Settings tab, click Switch to Advanced Backup Settings.
-
In the Note dialog box that appears, read the message, select the checkbox, and click OK. The console then displays the advanced backup settings page, which supports the sparse backup feature.
After you configure the backup policies, click the Save button in the lower-left corner to save the settings.
-
Level-1 Backup
Click the button on the line that connects PolarDB and Level-1 Backup to configure the Level-1 Backup policy. For more information, see Configure a backup policy.
-
Same-region level-2 backup
Click the button on the line that connects 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 configure the policy on a weekly, monthly, or yearly basis and set the retention period for backup sets in the standard storage pool. You can also configure multiple dump policies for each period.
In the Level-2 Backup dialog box, click Add Backup Policy to add a policy row. For each row, select a time cycle (weekly, monthly, or yearly) and the specific dates, set the Retention Period in days, or select Retain Permanently. Click the delete button on the right side of a row to remove the policy. After the configuration is complete, click OK.
The following list describes the same-region level-2 backup configuration:
-
Dump backup sets created on Mondays from the extreme storage pool to the standard storage pool and retain them in the standard storage pool for 30 days.
-
Dump backup sets created on Wednesdays and Fridays from the extreme storage pool to the standard storage pool and retain them permanently.
-
Dump backup sets created on the 1st of each month from the extreme storage pool to the standard storage pool and retain them in the standard storage pool for 365 days.
-
Dump backup sets created on the 11th and 21st of each month from the extreme storage pool to the standard storage pool and retain them in the standard storage pool for 180 days.
-
Dump backup sets created on January 1st of each year from the extreme storage pool to the standard storage pool and retain them in the standard storage pool for 7,300 days.
Note-
If a backup set matches multiple rules, the longest retention period is applied.
-
In the above configuration, a backup set from January 1, 2023, matches both the rule for the 1st of each month and the rule for January 1st of each year. Because the retention period for the yearly rule (7,300 days) is longer, the backup set is retained for 7,300 days after the dump.
-
A backup set from August 1, 2022 (a Monday), matches the rules for both the 1st of each month and every Monday. Because the rule for the 1st of each month has a longer retention period (365 days), the backup set is retained for 365 days.
-
-
To ensure a backup set is available for a scheduled dump, the system verifies that a backup task is also scheduled for that day. If not, a default backup policy is automatically created. The backup sets created by this policy are retained in the extreme storage pool for one day.
-
For example, a backup task is set to run every Monday, Wednesday, and Friday. A dump task is set to dump backup sets from the 1st of each month to the standard storage pool. In this case, a backup is not guaranteed to exist on the 1st of every month. The system then automatically generates a backup policy to create a backup on the 1st of each month and retain it for one day. You can view all auto-generated policies in the Automatically Generated Backup Policy section at the bottom of the page.
-
If the backup policy is set to run every Monday and Thursday, after you configure the dump policy as described above, the system automatically generates additional backup policies.
-
-
If high frequency backup is enabled 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.
-
For example, a backup policy is configured to run every 4 hours. On January 1, 2023, six backup sets are created at 00:00, 04:00, 08:00, 12:00, 16:00, and 20:00. Based on the above configuration, only the backup set from 00:00 on January 1, 2023, is dumped to the standard storage pool.
-
For example, a backup policy is set to start at 06:00, and a backup set is created at 06:00 on January 1, 2023. At 12:00 on the same day, you change the start time to 20:00, and another backup set is created at 20:00. Based on the above 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
This allows you to dump backup sets from various schedules to different regions.
The following list describes the cross-region level-2 backup configuration:
-
Dump backup sets created on Mondays to the standard storage pool in the China (Qingdao) region and retain them for 30 days.
-
Dump backup sets created on the 1st of each month to the standard storage pool in the China (Beijing) region and retain them for 365 days.
-
Dump all log backups to the standard storage pool in the China (Beijing) region and retain them for 3 days.
NoteYou can dump log backups to a destination region only when full backup sets are also dumped to that region.
-
-