You can download unencrypted data and log backup files from the RDS console to archive and restore data to an on-premises database.

Precautions

  • PostgreSQL 11 High-availability Edition (cloud disk) and PostgreSQL 10 High-availability Edition (cloud disk) do not allow you to download backup files.
  • PostgreSQL 10 Basic Edition does not allow you to download backup files.
  • You cannot download backup files by using a read-only RAM user account. You can assign 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.

Procedure

  1. Log on to the ApsaraDB for RDS console.
  2. In the upper-left corner of the page, select the region where the instance is located.

  3. Click the ID of the instance to go to the Basic Information page.
  4. In the left-side navigation pane, select Backup and Restoration to go to the Backup and Restoration page.
  5. Click the corresponding tab based on the type of backup that you want to download.
    • Data backup: Click the Backup Sets tab.
    • Log backup: Click the Archive List tab.
  6. Specify a time range to query the backups created in that period.
  7. Find the data backup or binlog file that you want to download, and click Download in the Actions column.
    Note
    • If you need to restore data by using data backup files, select the backup file that is closest to the time for restoration.
    • If you use the binlog file to restore data to an on-premises database, note that:
      • The Instance ID of the binlog file on the Archive List tab must be the same as the Instance No. of the data backup file on the Backup Sets tab.
      • The start time of the binlog file must be later than the data backup time and earlier than the time when you need to restore data.
  8. In the Download Instance Backup Set or Download Binary Log dialog box that appears, select a download method.

    Download method Description
    Download Download the backup file by using an Internet address.
    Copy Internal Download URL Copy the internal download URL. If the ECS and RDS instances are in the same region, you can log on to the ECS console and use the internal address to download the backup file. This method is faster and more secure.
    Copy External Download URL Copy the external download URL and use other tools to download the backup file.
    Note If you download a file in Linux, run the following command:
    wget -c '<download address>' -O <customized file name>.tar.gz
    • -c: specifies to resume from the breakpoint.
    • -O: specifies a name for the download file (use the file name suffix .tar.gz or .xb.gz as contained in the URL).
    • If the download URL has multiple parameters, we recommend that you add single quotation marks to the download URL to avoid download failure.