This topic describes how to download the data backup files and log backup files of an RDS MySQL instance. The downloaded log backup files are not encrypted. You can save the backup files for archiving or use them to restore the instance to an on-premises database.
An RDS MySQL instance with SSDs does not support the download of data backup files. You can restore the data of an RDS MySQL instance or migrate data from RDS MySQL to an on-premises MySQL database.
A RAM user who has only the read-only permissions cannot download backup files. You can add the required permissions to a RAM user in the RAM console. For more information, see Grant backup file download permissions to a RAM user with only read-only permissions.
|DB engine||Data backup download||Log backup download|
||All versions support the download of log backup files.
Note For more information about binary logs, see How do I use the mysqlbinlog command to view the binary logs of an RDS for MySQL instance?
- Log on to the RDS console.
- Select the target region.
- Find the target RDS instance and click the instance ID.
- In the left-side navigation pane, click Backup and Restoration.
- Click the Data Backup or Log Backup tab.
- If you want to download data backup files, click Data Backup.
- If you want to download log backup files, click Log Backup
- Select a time range and click Search.
- Find the data or log backup file you want to download, and in the Actions column click Download.
- If the Download button is unavailable, see Limits.
- If you want to use the downloaded data backup file for data restoration, we recommend that you select the data backup file that was generated at the time point closest to the time point from which you want to restore data.
- If you want to use the downloaded log backup file to restore your RDS instance to
an on-premises database, note the following:
- The Instance ID of the log backup file must be the same as the Instance No. of the selected data backup file.
- The start time of the log backup file must be later than the generation time of the selected data backup file and earlier than the time point from which you want to restore data.
- In the Download Instance Backup Set or Download Binary Log dialog box, select a download method.
Download method Description Download To download the backup file through the public connection address. Copy Internal Download URL To copy the internal download URL only. When your ECS instance is located in the same region as the RDS instance, you can log on to your ECS instance and then use the internal download URL to download the backup file. This is faster and more secure. Copy External Download URL To copy the external download URL only. This method is suitable when you download the backup file by using other tools.Note In a Linux operating system, you can run the following command to download a data backup file:
wget -c '<Download URL of the data backup file>' -O <User-defined file name>.tar.gz
- The -c parameter is used to enable resumable download.
- The -O parameter is used to save the downloaded result as a file with the specified name (the file extension is .tar.gz or .xb.gz as included in the URL).
- If you enter more than one download URL, then you must include each download URL in a pair of single quotation marks (''). Otherwise, the download fails.
- Why are there two binary log files that have the same name for an RDS MySQL instance?
RDS MySQL works in the master/slave HA architecture. Therefore, both the master and slave instances generate binary logs. You can distinguish between two binary log files that have the same name based on their Instance IDs. To view the IDs of the master and slave instances, you can go to the Service Availability page.
- What can I use the downloaded data and log backup files for?
You can use the downloaded data and log backup files to restore data at anytime. For more information, see Restore data from physical backup files of ApsaraDB for MySQL to an on-premises user-created database.