This topic describes how to view and manage the size of backup files of an ApsaraDB RDS for MySQL instance. You can delete backup files or decrease the size of backup files to reduce backup storage costs. For more information, see Billable items and pricing for the backup storage of an ApsaraDB RDS for MySQL instance.
View the size of backup files
Total size of backup files = Size of data backup files + Size of log backup files
You can check the Backup Usage parameter in the Usage Statistics section of the Basic Information page of your RDS instance to view the total size of backup files.
After you update the minor engine version of an RDS instance or a serverless RDS instance, the value of the Backup Usage parameter on the Basic Information page of the instance may be 0. After the next scheduled backup is complete, the actual value of the Backup Usage parameter is displayed.
In the following figure, the size of backup files includes 29.42 MB of data backup files and 19.57 MB of log backup files. Archive backup indicates the size of the backup files that are retained for more than 730 days. Data indicates the size of the data backup files that are not archived.
Description
Delete data backup files or reduce the size of data backup files
Delete data backup files
This method can be used to delete the data backup files that are generated only from manual backups. For more information, see Manually back up an ApsaraDB RDS for MySQL instance. You can move the pointer over the icon in the Backup Policy column to check whether the backup set is automatically generated or manually generated.
If the backup policy of a manual backup file is Database/Table Backup, you cannot delete the backup file. You can check whether the backup policy is Database/Table Backup in the Backup Policy column of the data backup file.
If you delete a manual backup file, the deleted backup file cannot be restored.
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 left-side navigation pane of the page that appears, click Backup and Restoration.
On the Backup and Restoration page, choose Base Backups > Data Backup.
On the tab that appears, find the backup file that you want to delete, click the icon, and then select Delete in the Actions column.
Automatically delete data backup sets
You can use this method to delete the backup files that are generated from manual backups and automatic backups. For more information, see Manually back up an ApsaraDB RDS for MySQL instance and Use the automatic backup feature.
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 left-side navigation pane of the page that appears, click Backup and Restoration.
On the Backup and Restoration page that appears, click the Backup Strategy tab.
In the Basic Backup section, click Edit to reduce the data backup retention period.
ImportantFor example, the data backup retention period of your RDS instance is 30 days.
If you do not upgrade the log backup feature to the point-in-time restoration (PITR) feature for your RDS instance, data backup files that are retained for more than 30 days are automatically deleted and cannot be restored. Proceed with caution.
If you upgrade the log backup feature to the PITR feature for your RDS instance, data backup files can be retained for more than 30 days. For more information, see Configure the PITR feature.
Reduce the size of data backup files
Method 1: Reduce the data backup frequency
- 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 left-side navigation pane, click Backup and Restoration.
On the Backup and Restoration page that appears, click the Backup Strategy tab.
In the Basic Backup section, click Edit to reduce the backup frequency.
Method 2: Retain the minimum number of backup sets by using the sparse backup feature
In some regions, you can use the spare backup feature by enabling the advanced backup settings on the Backup Strategy tab. The sparse backup feature allows you to configure backup policies for your RDS instance in a more flexible manner and retain the minimum number of backup sets. For more information, see Switch to the advanced backup settings and Use the sparse backup feature.
Method 3: Delete or migrate the data that does not need to be backed up
Reduce the size of log backup files or disable the log backup feature
Reduce the size of log backup files
Method 1: Shorten the log backup retention period
You can specify the log backup retention period only when the log backup feature or the PITR feature is enabled. For more information about how to enable the feature, see Log backup settings.
- 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 left-side navigation pane, click Backup and Restoration.
On the Backup and Restoration page that appears, click the Backup Strategy tab.
In the Basic Backup section, click Edit and configure the Log Backup Retention Period (Days) or Time Range of Specific Points in Time for Restoration parameter to shorten the log backup retention period. For more information, see Configure the PITR feature.
ImportantFor example, the Log Backup Retention Period (Days) or Time Range of Specific Points in Time for Restoration parameter is set to 30 for your RDS instance.
If you do not upgrade the log backup feature to the PITR feature for your RDS instance and set the Log Backup Retention Period (Days) parameter to 30, data backup files that are retained for more than 30 days are automatically deleted and cannot be restored. Proceed with caution.
If you enable the PITR feature for your RDS instance and modify the value of the Time Range of Specific Points in Time for Restoration parameter, the retention period of log backups is also modified. If you set the value of this parameter to 30, the system retains the log backup files that are required to restore data of your RDS instance to any point in time within 30 days. This way, the overall retention period of log backup files may exceed 30 days. For more information, see Feature description.
Method 2: Retain the minimum number of backup sets by using the sparse backup feature
In some regions, you can use the spare backup feature by enabling the advanced backup settings on the Backup Strategy tab. The sparse backup feature allows you to configure backup policies for your RDS instance in a more flexible manner and retain the minimum number of backup sets. For more information, see Switch to the advanced backup settings and Use the sparse backup feature.
Method 3: Reduce unnecessary add, delete, and update operations, especially the update operations on large fields
Add, delete, and update operations increase the total size of log backup files.
You can use the SQL Explorer feature to view the add, delete, update, and query operations that are performed on your RDS instance. For more information, see Use the SQL Explorer feature on an ApsaraDB RDS for MySQL instance.
Disable the log backup feature
- 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 left-side navigation pane, click Backup and Restoration.
On the Backup and Restoration page that appears, click the Backup Strategy tab.
In the Basic Backup section, click Edit to disable the log backup feature or the PITR feature.
ImportantAfter you disable the log backup feature, the system automatically deletes existing log backup files within 1 to 3 minutes. Deleted log backup files cannot be restored. Proceed with caution.
Related operations
You can call the DeleteBackup operation to delete the data backup files of an instance. For more information, see DeleteBackup.
You can call the ModifyBackupPolicy operation to modify the backup settings of an instance. For more information, see ModifyBackupPolicy.