All Products
Search
Document Center

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

Last Updated:Sep 04, 2023

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

Manually 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 Single-Database Backup, you cannot delete the backup file. You can check whether the backup policy is Single-Database 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 file that you want to delete, click the 1 icon, and then click Delete in the Actions column.

    image.png

Automatically delete data backup files

Note

This method can be used to manually 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 Enable the automatic backup feature for an ApsaraDB RDS for MySQL instance.

  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. On the tab that appears, click Edit in the Basic Backup section to reduce the data backup retention period.

    Important

    Data backup files that are retained for a longer period than the specified data backup retention period are automatically deleted and cannot be restored. Proceed with caution.

    For example, if you set the data backup retention period of your RDS instance to 30 days, the system immediately deletes the data backup files that are retained for more than 30 days on your RDS instance.

Reduce the size of data backup files

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

  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 shorten the log backup retention period.

    For example, if you set the log backup retention period of your RDS instance to 30 days, the system automatically deletes the log backup files that have been retained for more than 30 days on your RDS instance.

    Note

    You can set the log backup retention period only when the log backup feature is enabled. For more information, see Enable the automatic backup feature for an ApsaraDB RDS for MySQL instance.

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 Base Backup section, click Edit to disable the log backup feature.

Related operations

Operation

Description

DeleteBackup

Deletes backup files from an instance.

ModifyBackupPolicy

Modifies the automatic backup settings of an instance.