All Products
Search
Document Center

ApsaraDB RDS:View and manage the size of backup files

Last Updated:Sep 01, 2023

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

Note
  • 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 your RDS instance that runs RDS Basic Edition, the Backup Size parameter on the Basic Information page in the ApsaraDB RDS console may be displayed as 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 33.2 GB of data backup files and 20.19 MB of log backup files. Archive backup indicates the size of the backup files that are retained for more than 730 days, and Data indicates the size of the data backup files that are not archived.备份大小

Description

Relationship between the size of backup files and the storage capacity

  • Data backup files and log backup files occupy the backup storage that is provided by Alibaba Cloud. These files do not occupy the storage capacity of your RDS instance.

  • Log files are categorized as binary log files and log backup files.

    Log

    Description

    Price

    Functionality

    Binary log files

    Binary log files refer to the raw log files that are generated on your RDS instance. Binary log files are stored on your RDS instance.

    Binary log files do not generate fees. However, binary log files consume the storage capacity of your RDS instance.

    Binary log files can be used to build the primary/secondary architecture.

    Log backup files

    After you enable the log backup feature, the system uploads the binary log files of your RDS instance to the specified backup storage. The log files that are stored in the specified backup storage are log backup files.

    For more information, see Billable items and pricing for the backup storage of an ApsaraDB RDS for MySQL instance.

    Log backup files can be used to restore data to a point in time.

    Note

Relationship between the size of backup files and the amount of data

The size of backup files may not equal the amount of data on your RDS instance.

If your RDS instance uses cloud disks, the system creates snapshots to back up your RDS instance. The size of a snapshot backup file may be significantly larger than the amount of data. The free quota on backup storage for an RDS instance that uses cloud disks is 200% of the storage capacity of the RDS instance. The free quota on backup storage for an RDS instance that uses local disks is 50% of the storage capacity of the RDS instance.

Note

When the system calculates the size of a snapshot backup file, the system counts in all the non-empty blocks to which data is written. If the write operations are scattered among blocks, none of the blocks is empty. For example, if 3 MB of data is written across two, three, or four blocks, none of these blocks is empty. In this case, the system counts in all these blocks to calculate the total size. As a result, the size of the snapshot backup file is larger than the actual amount of data.

Relationship between the size of backup files and the instance architecture

The size of backup files does not vary based on the instance architecture. For example, if an RDS instance that runs RDS High-availability Edition has the same amount of data as an RDS instance that runs RDS Basic Edition, the RDS instances have the same size of backup files. The size of backup files does not increase even if you use an RDS edition that provides high availability.

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

Delete data backup files

Manually delete data backup files that are generated from manual backups

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 that are generated from manual backups and automatic backups

  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

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.

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

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.

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.