This topic describes how to download unencrypted data backup files and binary log files from an ApsaraDB RDS for MySQL instance. You can archive the files for future use or use them to restore data to an on-premises database.
A RAM user with only read-only permissions cannot download files. You can grant the required permissions to the RAM user in the RAM console. For more information, see Grant backup file download permissions to a RAM user with only read-only permissions.
|Database engine||Download of data backup files||Download of binary log files|
||All MySQL versions support the download of binary log files.
Note For information about how to view binary log files, see How do I use the mysqlbinlog command to view the binary logs of an RDS for MySQL instance?
- Log on to the ApsaraDB for RDS console.
- In the upper-left corner of the page, select the region where the target instance is located.
- Find the target RDS instance and click its ID. The Basic Information page appears.
- In the left-side navigation pane, click Backup and Restoration.
- Click the Data Backup or Log Backup tab.
- To download data backup files, click the Data Backup tab.
- To download binary log files, click the Log Backup tab.
- Specify a time range to query the data backup files or binary log files created during that period.
- Find the data backup file or binary log file you want to download, and click Download in the Actions column.
- If the Download button is not available, see the Limits section in this topic.
- If you want to restore data by using a data backup file, select the file that was created at the point in time closest to the point in time requiring data restoration.
- If you use a binary log file to restore data to an on-premises database, make sure
that the following requirements are met:
- The Instance ID of the binary log file on the Log Backup tab must be the same as the Instance No. displayed on the Data Backup tab.
- The start time of the binary log file must be later than the start time of the specified time range and earlier than the point in time requiring data restoration.
- In the Download Binary Log dialog box that appears, click Download.
Download method Description Download Use a browser to download the backup file. Copy Internal Download URL To only copy the internal download URL of the file. If your ECS instance and RDS instance reside in the same region, you can log on to the ECS console and use the internal download URL to download the file. This method is faster and more secure. Copy External Download URL To only copy the external download URL of the file. If you want to use other tools to download the file, select this method.Note If you are using a Linux operating system, you can run the following command to save the file:
wget -c '<The URL from which to download the file>' -O <The name of the file you want to download>
- The -c parameter enables resumable download.
- The -O parameter saves the downloaded file by its specified name. We recommend that you use the file name from the download URL.
- If the download URL contains more than one parameter, we recommend that you enclose the download URL in a pair of single quotation marks (').
- Why do I find two binary log files with the same name on the Log Backup tab?
In the High-availability Edition, your database system consists of a primary instance and a secondary instance. The primary and secondary instances both generate binary log files. Each binary log file is identified by an Instance ID on the Log Backup tab. You can distinguish the binary log files generated by the primary instance from those generated by the secondary instance based on their instance IDs. On the Service Availability page, you can view the primary instance ID under Primary Instance No. and the secondary instance ID under Secondary Instance No..
- What can I do with the data backup file or binary log file that I downloaded?
You can use a data backup file or binary log file to restore data at any time. For more information, see Use a physical backup file to restore an ApsaraDB RDS for MySQL instance to a user-created MySQL database or Restore data from logical backup files of an ApsaraDB RDS MySQL instance to an on-premises database.
- Why is the Download button not available on the Backup and Restoration page?
For MySQL 5.7 and MySQL 8.0 instances with standard SSDs or enhanced SSDs (ESSDs) (in the RDS Basic or High-availability Editions), backup files cannot be downloaded. You can restore data to a new RDS instance or use DTS to migrate data to an on-premises database.