TDSQL-C for MySQL supports the sparse backup feature, helping you achieve granular control over data retention. Sparse backup is an extended backup retention capability built upon the current regular backup feature (where the system performs automatic backups on a weekly basis). With the core objective of enabling flexible backup cycle and retention policy configurations, it allows setting fixed-frequency backup cycles such as "weekly/monthly/yearly".
This article describes the sparse backup feature and relevant operations.
feature application scenarios
Sparse backup helps you implement granular data retention policies. This feature supports setting fixed-frequency backup cycles such as "weekly/monthly/yearly". Additionally, it allows configuring different retention periods for distinct backup cycles. For example, you can set important data to be backed up at a weekly frequency with a 30-day retention period, while also setting monthly backups with a 365-day retention period.
Feature entry description
During the use of the sparse backup feature, some new feature terms are involved. You can refer to their definitions in the following table.
|
Sparse Backup Policy | After enabling the sparse backup feature, you need to configure the backup retention policy, where you can set the retention cycle and duration for backups. |
Sparse Backup Cycle | Sparse backup policy supports setting backup cycles with the following granularities: weekly, monthly, and yearly. |
Sparse Backup Rules | Date conventions for creating backup tasks within the sparse backup policy. |
Sparse Backup Retention Period | Backup Retention Duration for Sparse Backup Policies. |
Viewing a Backup Plan | After the sparse backup feature is enabled and the configuration is completed, you can view the backup plan to preview the distribution of backup creation dates and backup types from the current time to one year in the future. |
Supported versions for features
TDSQL-C for MySQL clusters with the instance mode of provisioned resources/Serverless in versions 5.7 and 8.0 support using this feature.
Billing instructions for features
This feature is currently free to use. The subsequent commercialization billing policy and timeline will be notified separately. You can follow the Service Announcements. Feature operation guide
Feature Operation Overview and Quick Navigation:
Enable sparse backup
Note:
Supports setting 1-3 sparse backup policies.
After the sparse backup feature is enabled, the backup task will be initiated on the same day when the sparse backup policy is set. If the task initiation fails, an internal alarm notification will be generated.
When a sparse backup policy and a regular backup policy take effect on the same day, two backup files—a regular backup and a sparse backup—will be generated for the cluster. The retention periods for these backups are applied according to their respective policies. For example: if regular backups are scheduled every Monday with a 7-day retention period, and sparse backups are scheduled on the 1st of each month with a 30-day retention period, then on December 1, 2025 (Monday), the cluster will produce one regular backup with a 7-day retention period and one sparse backup with a 30-day retention period.
If multiple sparse backup policies are triggered on the same day, the system will retain only one sparse backup for the longest retention period. For example: if sparse backups are scheduled every Monday with a 7-day retention period and on the 1st of each month with a 30-day retention period, then on December 1, 2025 (Monday), only one sparse backup with a 30-day retention period will be generated for the cluster.
2. In the cluster list, click the target cluster to go to the cluster management page.
3. On the cluster management page, choose Backup Management > Auto-Backup Settings.
4. In the pop-up window, under Snapshot Backup > Advanced Settings, enable Sparse Backup. After the following configurations are completed, click OK.
|
Add Policy | Click Add Policy to set sparse backup policies. A minimum of 1 policy and a maximum of 3 policies are supported. |
Sparse Backup Policy | After clicking Add Policy, you need to configure the policy: Sparse Backup Cycle For weekly backups, the selectable range is from Monday to Sunday. Multiple selections are supported, and you can select a maximum of 7 days. For monthly backups, the selectable range is from day 1 to 31. Multiple selections are supported, and you can select a maximum of 30 days. For yearly backups, the selection range allows you to customize months and days. Multiple selections are supported, and you can select a maximum of 30 days. Retention Period: Set the backup retention duration for each sparse backup rule. Range: 7 days – 7320 days (20 years). |
View sparse backup
Scenario 1: Viewing sparse backup in the backup list
2. In the cluster list, click the target cluster to go to the cluster management page.
3. On the cluster management page, choose Backup Management > Data Backup List.
4. You can check whether the corresponding backup set is a Sparse Backup or Regular backup under the Backup Frequency field in the Data Backup List.
Scenario 2: View Backup Plan
2. In the cluster list, click the target cluster to go to the cluster management page.
3. On the cluster management page, choose Backup Management > Auto-Backup Settings.
4. Within the pop-up window, click Backup Plan on the right side of Snapshot Backup > Advanced Settings > Sparse Backup.
5. In the pop-up window, you can preview the distribution of backup retention dates and types for the current cluster for the next year.
Note:
Click the backup type (sparse backup, regular backup) to hide that backup type.
The backup plan display distinguishes between regular/high-frequency/sparse backups. If multiple backup policies are matched on the same day, all backup types will be displayed. As shown in the figure above, the day highlighted in red displays a case where one regular backup and two sparse backups were matched.
If both regular backup and sparse backup policies are triggered on the same day, the cluster will generate two files: a regular backup and a sparse backup. The retention period for each will be applied according to their respective policies. For example: if a regular backup is scheduled every Monday with a 7-day retention period, and a sparse backup is scheduled on the 1st of each month with a 30-day retention period, then on Monday, December 1, 2025, the cluster will produce one regular backup with a 7-day retention period and one sparse backup with a 30-day retention period.
If multiple sparse backup policies are triggered on the same day, the system will retain only one sparse backup for the longest retention period. For example: if sparse backups are scheduled every Monday with a 7-day retention period and on the 1st of each month with a 30-day retention period, then on December 1, 2025 (Monday), only one sparse backup with a 30-day retention period will be generated for the cluster.
Modify sparse backup policy
After the sparse backup feature is enabled, if you want to change the sparse backup policy, follow the steps below.
Note:
Modifying the sparse backup schedule in the sparse backup policy does not affect existing sparse backup files. For example: if you change the backup schedule from the 1st of each month with a 30-day retention period to the 2nd of each month with a 30-day retention period, the existing sparse backup files generated on the 1st will still be retained for 30 days.
Modifying the retention period in the sparse backup policy does not affect the retention duration of existing sparse backup files. For example: if you change the backup schedule from the 1st of each month with a 30-day retention period to the 1st of each month with a 365-day retention period, the existing sparse backup files generated on the 1st will still be retained for 30 days.
When multiple sparse backup rules exist, the system prioritizes applying the rule with the longest retention period. If you modify the sparse backup retention period, existing sparse backups will retain their original retention periods. For example: sparse backup policy a is set to retain backups every Monday for 7 days; sparse backup policy b is set to retain backups on the 1st of each month for 30 days. On Monday, December 1, 2025, the cluster generates a sparse backup c with a 30-day retention period. If sparse backup policy a is modified to retain backups every Monday for 60 days, the retention period for the existing sparse backup c remains 30 days.
2. In the cluster list, click the target cluster to go to the cluster management page.
3. On the cluster management page, choose Backup Management > Auto-Backup Settings.
4. In the pop-up window, click Snapshot Backup > Advanced Settings > Sparse Backup, then click Modify Backup Settings.
5. In the sparse backup policy, modify the sparse backup schedule and retention period, then click OK.
Delete sparse backup policy
If multiple sparse backup policies exist and you wish to delete redundant ones, follow the steps below.
Note:
Deleting a single sparse backup policy does not support deleting all; deleting all means disabling the sparse backup feature. See the steps below in Disable sparse backup to implement this. Deleting the original sparse backup rules does not affect existing sparse backup files. For example: if you delete the sparse backup rule set to retain backups on the 1st of each month for 30 days, the existing sparse backup files generated on the 1st will still be retained for 30 days.
2. In the cluster list, click the target cluster to go to the cluster management page.
3. On the cluster management page, choose Backup Management > Auto-Backup Settings.
4. In the pop-up window, under Snapshot Backup > Advanced Settings > Sparse Backup, click to delete redundant sparse backup policies, then click OK. Disable sparse backup
Note:
Once the sparse backup feature is disabled, no new sparse backups will be generated. Existing sparse backups will remain effective according to their original retention periods and will be automatically cleaned up after the retention period expires.
2. In the cluster list, click the target cluster to go to the cluster management page.
3. On the cluster management page, choose Backup Management > Auto-Backup Settings.
4. In the pop-up window, under Snapshot Backup > Advanced Settings, disable Sparse Backup.
5. Read the notes in the pop-up window and click OK.