This topic describes how to view and manage the size of backup files for 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 log on to the ApsaraDB RDS console and go to the Basic Information page of your RDS instance to view the size of backup files for your RDS instance in the lower-right corner of the instance details page.

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.

Note
  • In the following figure, 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.
  • 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, this error is automatically fixed.
Total size of backup files

Description

  • Relationship between the size of backup files and the storage capacity
    • Data and log backup files consume the backup storage that is provided by Alibaba Cloud. These files do not consume the storage capacity of your RDS instance.
    • Log files are categorized as binary log files and log backup files.
      Log file typeDescriptionPricePurpose
      Binary log filesBinary 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 filesAfter you enable the log backup feature, ApsaraDB RDS 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 Backup storage pricing of an ApsaraDB RDS for MySQL instance. Log backup files are used to restore the data of your RDS instance to a specific point in time.
      Note
      • You can delete the binary log files of your RDS instance. This reduces the storage that is consumed by binary log files on your RDS instance. This does not reduce the size of log backup files. For more information, see Delete the binary log files of an ApsaraDB RDS for MySQL instance.
      • You can log on to the ApsaraDB RDS console and go to the Monitoring and Alerts page of your RDS instance to view the storage that is consumed by binary log files on your RDS instance. View the size of binary log files
  • 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 standard SSDs or enhanced SSDs (ESSDs), ApsaraDB RDS creates snapshots to back up your RDS instance. The size of a snapshot backup file may be significantly larger than the amount of data. Therefore, the free backup quota for an RDS instance that uses standard SSDs or ESSDs is four times the free backup quota for an RDS instance that uses local SSDs. For more information, see Backup storage pricing for an ApsaraDB RDS for MySQL instance.
    Note When ApsaraDB RDS calculates the size of a snapshot backup file, ApsaraDB RDS 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, ApsaraDB RDS 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, these 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 data backup frequency

  • Delete a backup set

    Prerequisites

    Before you delete a manual backup set, make sure that a manual backup set is created for your RDS instance. For more information, see Manually back up an ApsaraDB RDS for MySQL instance.

    Procedure

    1. Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
    2. In the left-side navigation pane, click Backup and Restoration.
    3. On the page that appears, click the Base Backups tab and then the Data Backup tab.
    4. Find the backup set that you want to delete. Then, click the 1 icon and select Delete in the Actions column.
      Note
      • If the backup set that you want to delete is an automatic backup set, Delete is dimmed, and the backup set cannot be deleted.
        • If the log backup feature is disabled, you can delete only the data backup files that are retained for more than seven days.
        • If the log backup feature is enabled, you can delete only the data backup files that are retained for a longer period than the specified log backup retention period. For example, if you set the log backup retention period to seven days, you can delete the data backup files that are retained for more than seven days.
      • If the backup policy of the manual backup set is Single-Database Backup, the manual backup set cannot be deleted.
      • After a manual backup set is deleted, the backup set cannot be restored.
  • Shorten the retention period of data backup files
    1. Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
    2. In the left-side navigation pane of the page that appears, click Backup and Restoration.
    3. On the Backup and Restoration page, click the Backup Strategy tab.
    4. In the Base Backup section, click Edit. In the dialog box that appears, decrease the value of the Data Backup Retention (Days) parameter.

      ApsaraDB RDS automatically deletes the data backup files that are stored for a longer period than the specified data backup retention period. For example, if you set the data backup retention period of your RDS instance to 30 days, ApsaraDB RDS immediately deletes the data backup files that have been retained for more than 30 days on your RDS instance.

  • Reduce the data backup frequency
    1. Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
    2. In the left-side navigation pane of the page that appears, click Backup and Restoration.
    3. On the Backup and Restoration page, click the Backup Strategy tab.
    4. In the Base Backup section, click Edit. In the dialog box that appears, decrease the value of the Backup Cycle parameter to reduce the backup frequency.
  • Delete or migrate the data that does not need to be backed up

Reduce the log backup frequency or disable the log backup feature

  • Shorten the retention period of a log backup file
    1. Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
    2. In the left-side navigation pane of the page that appears, click Backup and Restoration.
    3. On the Backup and Restoration page, click the Backup Strategy tab.
    4. In the Base Backup section, click Edit. In the dialog box that appears, decrease the value of the Log Retention Period (Days) parameter.
      For example, if you set the log backup retention period of your RDS instance to 30 days, ApsaraDB RDS 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.
  • Disable the log backup feature
    1. Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
    2. In the left-side navigation pane of the page that appears, click Backup and Restoration.
    3. On the Backup and Restoration page, click the Backup Strategy tab.
    4. In the Base Backup section, click Edit. In the dialog box that appears, turn off Log Backup.
      Note After the log backup feature is disabled, ApsaraDB RDS immediately deletes all log backup files. You cannot restore the data of your RDS instance to a specific point in time.
  • 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.