This topic describes how to download the backup files of an ApsaraDB RDS for MySQL instance.

For more information about how to download the backup files of an RDS instance that runs a different database engine, see the following topics:

Before you begin

Before you download the backup files of your RDS instance, you must select a suitable solution based on your business scenario and requirements.
Business scenario and requirement Suggestion
  • Migrate the data of your RDS instance to a different RDS instance or a self-managed database.
  • Restore the data of your RDS instance from an existing backup file.
Use one of the following methods:
  • Query the data of your RDS instance from a specific point in time.
  • Query the data of your RDS instance from a backup file.
Use one of the following methods:
  • Restore the backup file to a new pay-as-you-go RDS instance. For more information, see Restore the data of an ApsaraDB RDS for MySQL instance. After the query is complete, release the pay-as-you-go RDS instance.
  • Obtain the URL from which you can download the backup file. For more information, see the "Procedure" section of this topic. Download the backup file, restore the backup file to a self-managed database, and then query data from the self-managed database.
  • If the backup file is generated by using Database Backup (DBS), you do not need to restore the backup file. You can directly query data from the backup file. For more information, see Query data in a single backup set.
  • Save a backup file of your RDS instance on your computer.
  • Download a backup file of your RDS instance and use the backup file for audit purposes.
Use one of the following methods:
  • Upload a backup file of your RDS instance to an Object Storage Service (OSS) bucket.
The backup files of your RDS instance do not occupy the purchased storage capacity. They are stored in the allocated backup storage and cannot be moved. Use one of the following methods to store a backup file of your RDS instance in an OSS bucket:
  • Use DBS to back up your RDS instance. Make sure that you select the specified OSS bucket as your storage. For more information, see Configure a backup schedule.
  • Obtain the URL from which you can download the backup file. For more information, see the "Procedure" section of this topic. Then, download the backup file and upload it to the specified OSS bucket.
  • Retain the backup files of your RDS instance for a long period of time.

Procedure

  1. Visit the RDS instance list, select a region above, and click the target instance ID.
  2. Go to the Backup and Restoration page.
  3. Click the Data Backup or Log Backup tab.
  4. Change the default time range. This step is required if you want to view the backup files that are generated eight days ago. The default time range spans the last eight days.
  5. Find the backup file that you want to download. Then, click Download in the Actions column.
    • When you download a data backup file, you may not find the Download button. In this case, perform the following checks:
      • Your RDS instance uses standard or enhanced solid-state drives (SSDs). Standard and enhanced SSDs do not support the download of data backup files.
        Note If your RDS instance uses standard or enhanced SSDs, you can perform the following operations to download the data backup file:
        • If the data backup file contains only the data from a small number of databases, you can use the mysqldump plug-in to download the data backup file. You can also use DMS to export the data backup file. For more information, see How do I back up and restore an ApsaraDB RDS for MySQL instance? and Export data.
        • If the data backup file contains the data from a large number of databases, you can migrate the data to a new RDS instance. The new RDS instance must use local SSDs. For more information, see Overview of data migration solutions. Then, back up the new RDS instance and download the generated data backup file.
      • If your RDS instance uses local SSDs and you have logged on by using the credentials of a Resource Access Management (RAM) user that does not have the permissions to download backup files, you must grant the permissions to the RAM user. For more information, see Grant backup file download permissions to a RAM user with only read-only permissions.
    • When you download a log backup file:
      • If you use the log backup file to restore the data of your RDS instance to a self-managed database, the point in time at which the required data backup file is generated must be within the restorable time range that is supported by the log backup file. In addition, the log backup file and the data backup file must be generated from the same RDS instance. This requires that the log backup file must have the same instance ID as the data backup file.
      • If your RDS instance runs the RDS High-availability or Enterprise Edition, both your RDS instance and its secondary RDS instance generate log backup files. You can view the IDs of your RDS instance and its secondary RDS instance on the Service Availability page.
      • The log backup files that are described in this section refer to the log backup files that are stored on your RDS instance. For more information about how to obtain these log backup files, see How do I use the mysqlbinlog command to view the binary logs of an RDS for MySQL instance?
  6. In dialog box that appears, copy the URL from which you want to download the backup file.
    • Copy Internal URL: You can log on to your Elastic Compute Service (ECS) instance and use the internal URL to download the backup file. This method is faster and more secure. It is suitable if your ECS instance resides in a virtual private cloud (VPC) and connects to your RDS instance over an internal network.
    • Copy Public URL: You can use the public URL to download the backup file. This method is suitable if your RDS instance cannot be connected over an internal network

FAQ

What do I do with the data and log backup files that I have downloaded?

You can use the data and log backup files that you have downloaded to restore data to a self-managed database. For more information, see Restore the data of an ApsaraDB RDS for MySQL instance from a physical backup file to a self-managed MySQL database and Restore the data of an ApsaraDB RDS for MySQL instance from a logical backup file to a self-managed MySQL instance.

Related operations

Operation Description
DescribeBackups Queries the data backup files of an ApsaraDB RDS instance.
DescribeBinlogFiles Queries the log backup files of an ApsaraDB RDS instance.