ApsaraDB RDS for PostgreSQL supports sparse backups in addition to regular backups. Sparse backup provides flexible backup policies with minimal backup set retention, shorter restore times, and lower storage costs.
Regular backup vs. sparse backup
|
Item |
Regular backup |
Sparse backup |
|
Data retention policy |
Backup sets are retained based on the configured retention policy. You must retain 2 to 7 backup sets per week. Example: retain one backup set every Monday and Sunday for 365 days. |
Custom backup cycles and flexible retention periods. You can retain only the minimum number of backup sets. Example: retain one backup set every Monday and Sunday for 7 days, and one backup set on the last day of each month for long-term retention. |
|
Storage cost |
Generates many backup sets, resulting in higher storage costs. |
Retains only the minimum number of backup sets, lowering storage costs. |
Prerequisites
-
The RDS instance uses cloud disks.
-
If you are using the RDS backup service for the first time, you must use your Alibaba Cloud account to authorize the AliyunServiceRoleForDBS service-linked role. For more information, see Authorize the service-linked role for Data Disaster Recovery.
You can view this information on the Basic Information page of the instance.
Usage notes
-
A new sparse backup policy takes effect in about 10 to 15 minutes.
-
The backup policy in the first row is fixed and cannot be deleted. You must set its backup cycle to Weekly (on at least two days) or High-frequency.
-
If multiple policies are scheduled for the same day, only one backup set is generated. It is retained for the longest retention period among these policies.
-
After you delete a sparse backup policy, existing backup sets from that policy are still retained for the original retention period.
-
If a backup is not successfully created or dumped within the backup window (for example, due to a backup failure, a locked instance, or an incomplete dump before the Level-1 Backup expires), the system skips the backup for that day. No extra backup set is retained.
For example, if you set a policy to perform a backup on the first day of each month and retain the backup set for 30 days, but the backup fails within the backup window on December 1, no backup set is retained for December 1.
Billing
Backup storage includes a free quota. If your total backup size exceeds the free quota, you are charged for the excess. Backup fees.
Switch to the advanced backup policy
To configure sparse backups, you must first switch to the advanced backup policy page. Skip this section if you have already switched.
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
-
In the navigation pane on the left, click Backup and Restoration.
-
On the Backup and Restoration page, click the Backup Strategy tab, and then click Switch to Advanced Backup Policy.
ImportantIf the Switch to Advanced Backup Policy button is not displayed, submit a ticket. After approval, refresh the page.
-
In the dialog box that appears, select the Understood checkbox, and then click OK.
ImportantThis switch is irreversible. You cannot revert to the previous backup settings page.
The Backup Strategy page now shows the advanced backup settings. You can configure sparse backup policies on this page. Configure a sparse backup policy.
The page displays the backup flow: The data source (PostgreSQL) is backed up to an Express Storage Pool as a Level-1 Backup, which is then transferred to a Standard Storage Pool for cross-region backup.
Configure a sparse backup policy
Add one or more custom backup policies to retain a minimum number of backup sets.
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
-
In the navigation pane on the left, click Backup and Restoration.
-
On the Backup and Restoration page, click the Backup Strategy tab. Then, click the circled number between PostgreSQL and Level-1 Backup.
-
In the dialog box that appears, click Add Backup Policy, configure the sparse backup policy, and then click OK.
Backup Cycle
Backup Time
Retention Period
15 minutes to 12 hours
Set the backup frequency to an interval from 15 minutes to 12 hours.
Note-
To use this cycle, click the first-row policy and change Weekly to High-frequency.
Set a retention period for each policy, ranging from 7 to 7,300 days.
NoteSelect Long-term Retention to retain backup sets for a long term.
Weekly
Select one or more days of the week.
Monthly
Select one or more days of the month or Last Day of Each Month.
Yearly
Select a specific day of the year. Example: January 1.
Note-
To configure other parameters, see Back up data of an ApsaraDB RDS for PostgreSQL instance.
-
The backup policy in the first row is fixed and cannot be deleted. You must set its backup cycle to Weekly (on at least two days) or High-frequency.
-
-
In the lower-left corner of the Backup Strategy tab, click Save.
Configuration example
Example sparse backup configuration:
-
Daily: back up every day (Monday through Sunday), retain for 7 days.
-
Weekly: back up every Monday, retain for 30 days.
-
Monthly: back up on the first and last day of each month, retain for 365 days.
-
Yearly: back up on January 1, long-term retention enabled.
What to do next
View backup policies
On the Backup Strategy page, hover over the circled number to view configured backup policies.
The number indicates the count of configured backup policies.
The policy summary shows retention periods for each cycle (for example, daily backup sets retained for 7 days, monthly for 30 days, yearly for 365 days), along with second-level backup and log backup settings. The page also displays the backup flow: data source → Express Storage Pool → Standard Storage Pool (cross-region backup). Click the numbered circles between stages to edit the corresponding policies.
Delete a backup policy
On the Level-1 Backup page, click the
icon to delete a backup policy.
The backup policy in the first row is fixed and cannot be deleted. You must set its backup cycle to Weekly (on at least two days) or High-frequency.