All Products
Search
Document Center

ApsaraDB RDS:Delete backup files or reduce the size of backup files

Last Updated:Feb 23, 2024

This topic describes how to delete the backup files or reduce the size of backup files of an ApsaraDB RDS for MySQL instance to reduce backup storage costs. For more information, see Billable items and pricing for the backup storage of an ApsaraDB RDS for MySQL instance.

Usage notes

The data backup files and log backup files of your RDS instance occupy the backup storage that is provided by Alibaba Cloud to the RDS instance. These backup files do not occupy the storage capacity of your RDS instance. For more information about how to view the size of backup files, see View and manage the size of backup files for an ApsaraDB RDS for MySQL instance. For information about how to release storage, see What do I do if my ApsaraDB RDS instance is in the Locking state?

Delete data backup files or reduce the size of data backup files

Delete data backup files

Note
  • 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.

  • 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.

  1. 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.

  2. In the left-side navigation pane of the page that appears, click Backup and Restoration.

  3. On the Backup and Restoration page, choose Base Backups > Data Backup.

  4. On the tab that appears, find the backup set that you want to delete, click the 1 icon, and then click Delete in the Actions column.

    image.png

Automatically delete data backup sets

Note

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.

  1. 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.

  2. In the left-side navigation pane of the page that appears, click Backup and Restoration.

  3. On the Backup and Restoration page that appears, click the Backup Strategy tab.

  4. In the Basic Backup section, click Edit to reduce the data backup retention period.

    Important

    For 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 backup data

Method 1: Reduce the data backup frequency

  1. 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.
  2. In the left-side navigation pane of the page that appears, click Backup and Restoration.

  3. On the Backup and Restoration page that appears, click the Backup Strategy tab.

  4. In the Basic Backup section, click Edit to reduce the backup frequency.

Method 2: 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

Note

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.

  1. 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.
  2. In the left-side navigation pane of the page that appears, click Backup and Restoration.

  3. On the Backup and Restoration page that appears, click the Backup Strategy tab.

  4. 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 Differences between the PITR and log backup features.

    Important

    For 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: 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.

Note

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

  1. 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.
  2. In the left-side navigation pane of the page that appears, click Backup and Restoration.

  3. On the Backup and Restoration page that appears, click the Backup Strategy tab.

  4. In the Basic Backup section, click Edit to disable the log backup feature or the PITR feature.

    Important

    After 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.

What to do next

  • 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.