Download backup files from ApsaraDB RDS for PostgreSQL to support long-term retention, offline queries, data migration, and compliance audits.
Downloaded backup data cannot be used to directly restore data to an RDS instance. To restore an RDS instance, see Restoration.
Manual backup files can be downloaded only after the manual backup task is complete. To check the status of a manual backup task, click the icon in the upper-right corner of the page to open the Task Center page.
ApsaraDB RDS for PostgreSQL supports two download methods based on the storage type of the instance:
Cloud disk instances — Use the advanced download feature to export backup data as CSV, SQL, or Parquet files, and deliver it to a URL or an Object Storage Service (OSS) bucket.
Premium Local SSD instances — Generate a download URL directly from the console and download the physical backup file.
Billing
Traffic fee
| Download path | Fee |
|---|---|
| Internal network | Free |
| Internet | Free for the first 500 GB per instance per month; excess is charged pay-as-you-go, deducted daily. See Network traffic fees. |
To view your Internet download traffic consumption, go to the Basic Information page of the instance and check Backup Downloads in the Usage Statistics section.
Backup set conversion fee
Applies only to cloud disk instances using the advanced download feature. Snapshot backup files are converted to CSV, SQL, or Parquet format before download.
| Region | Unit price |
|---|---|
| Public cloud | USD 0.03125 per GB |
No free quota is provided for backup set conversion. Failed conversion tasks are not charged.
Tip: To reduce Internet traffic costs, purchase a subscription network plan. A larger plan capacity gives a higher discount. See Use network plans.
Region | Unit price (USD per GB) |
Public cloud | 0.03125 |
Cloud disk instances
How it works
The advanced download feature converts snapshot backup files to a readable format before delivery.
Select the backup set or point in time to export.
Choose the download destination: a URL or an OSS bucket.
Choose the output format: CSV without headers, CSV with headers, SQL, or Parquet.
The system converts the snapshot backup file and generates the download output. Monitor task status on the Backup Download tab.
Prerequisites
Before you begin, make sure that:
The instance meets the following requirements:
Check the instance edition and storage type on the Basic Information page. If the instance uses Premium Local SSDs or standard SSDs, upgrade the major engine version to switch the storage type to ESSD. See Upgrade the major engine version.
RDS edition Instance type Minimum engine version Download by backup set Download by point in time RDS Cluster Edition Dedicated PostgreSQL 14 or later with ESSDs Supported Supported RDS Cluster Edition General-purpose PostgreSQL 14 or later with ESSDs Supported Supported RDS High Availability Edition Dedicated PostgreSQL 10 or later with ESSDs Supported Supported RDS High Availability Edition General-purpose PostgreSQL 10 or later with ESSDs Supported Supported RDS Basic Edition New general-purpose — Supported Not supported RDS Basic Edition General-purpose — Supported Not supported The instance resides in one of the following regions: China (Chengdu), China (Guangzhou), China (Qingdao), China (Beijing), China (Shanghai), China (Zhangjiakou), China (Hangzhou), China (Shenzhen), China (Hong Kong), Malaysia (Kuala Lumpur), Indonesia (Jakarta), Japan (Tokyo), Singapore, or Germany (Frankfurt).
The feature will be available in additional regions soon.
You have authorized Data Disaster Recovery to access resources in your Alibaba Cloud account. Go to Cloud Resource Access Authorization and grant the AliyunDBSDefaultRole role.
The encryption feature is not enabled on the instance. Advanced download is not supported for encrypted instances.
Limitations
Supported schema objects: tables, indexes, user-defined data types, unique constraints, foreign key constraints, NOT NULL constraints, and table inheritance.
Unsupported schema objects: CHECK constraints.
Supported data types: Numeric, string, datetime, Boolean, enumerated, array, UUID, jsonb, and bytea. Parquet output converts all types to strings.
Supported primary key types:
SMALLINT,INTEGER,BIGINT,SMALLSERIAL,SERIAL,BIGSERIAL,CHAR,VARCHAR, and composite primary keys. Tables without primary keys are also supported.System databases that cannot be exported:
template1,template0, andrdsadmin.System schemas that cannot be exported:
information_schemaandpg_catalog.If the download destination is OSS, only the Standard storage class is supported. See Convert storage classes.
Create an advanced download task
A download task cannot be canceled after it starts.
Log on to the ApsaraDB RDS console. In the top navigation bar, select the region of the instance. Find the instance and click its ID.
In the left-side navigation pane, click Backup and Restoration.
On the Base Backups > Data Backup tab, find the backup set and click Download Instance Backup in the Actions column.
By default, the console displays backup files from the last eight days. To view older backup files, change the time range.
In the Point in Time and Backup Set step, select Download by Point in Time or Download by Backup Set, then click Next.
Download by Point in Time is available only when log backup is enabled. See Use the log backup feature.
In the Instance, Database, and Table step, click Next. Instance download is selected by default.
In the Select Download Destination and Format step, configure the download destination and format, then click Complete.
Download to OSS (recommended)
Data is delivered directly to your OSS bucket for analysis or archiving.
Configure Select Bucket and Directory Prefix.
Set Download Format to one of the following: CSV without headers, CSV with headers, SQL, or Parquet.
If you lack OSS access permissions, click Authorize and then Confirm Authorization Policy as prompted, then reconfigure the parameters.
Read and accept the terms, then click Complete.
Go to the Backup Download tab. When the task Status changes from Running to Finished, the backup data is available in the specified OSS bucket.
Computing resources are shared for backup conversion. Temporary resource allocation failures or unsupported data formats can cause tasks to fail. If a task fails, retry or contact Data Disaster Recovery technical support. Failed tasks are not charged.
Download to URL
Data is stored in DBS built-in storage at no storage cost. See Built-in storage and OSS.
Set Download Format to one of the following: CSV without headers, CSV with headers, SQL, or Parquet. Read and accept the terms, then click Complete.
Go to the Backup Download tab and wait for the task Status to change to Finished.
ImportantComputing resources are shared for backup conversion. If a task fails, retry or contact Data Disaster Recovery technical support. Failed tasks are not charged.
Click Generate Link in the Download Destination column.
In the Generate Link dialog, set the Validity Period (5 minutes to 1 day; default is 2 hours), then click Generate Link. Two URLs are generated:
Internal URL — Use this from a virtual private cloud (VPC)-type Elastic Compute Service (ECS) instance that shares a VPC with the RDS instance. This method is faster and more secure.
Public URL — Use this when the RDS instance is not accessible over an internal network.
The download URL is available for three days after the task completes. After three days, both the task and its data are automatically deleted. To access the data again, create a new download task.
Save the URL promptly and keep it confidential.
Third-party download tools may generate additional download traffic, resulting in extra charges.
Instances with Premium Local SSDs
Prerequisites
Before you begin, make sure that:
The instance uses Premium Local SSDs. Check the storage type on the Basic Information page.
The RAM user has backup file download permissions. See Grant backup file download permissions to a RAM user with read-only permissions.
Download a backup file
Log on to the ApsaraDB RDS console. In the top navigation bar, select the region of the instance. Find the instance and click its ID.
In the left-side navigation pane, click Backup and Restoration.
Select the backup type:
For a data backup file: choose Base Backups > Data Backup.
For a log backup file: choose Base Backups > Log backup.
If you need backup files older than eight days, update the time range. The default range is the last eight days.
Find the backup file and click Download Instance Backup in the Actions column.
- If Download Instance Backup is not displayed, verify that all prerequisites are met. - To restore data, select the data backup file closest in time to the target recovery point. - For archived log backup files used in data restoration, verify that: the instance number matches that of the corresponding data backup file, and the log backup start time is after the data backup end time and before the target recovery point.
In the dialog, click Download or copy the URL:
Copy Internal URL — Use this from a VPC-type ECS instance that shares a VPC with the RDS instance. This method is faster and more secure.
Copy Public URL — Use this when the RDS instance is not accessible over an internal network.
- Download URLs expire one hour after generation. Refresh the page to get a new URL. - For the internal URL to work, the ECS instance and the RDS instance must reside in the same VPC. If they reside in VPCs in different regions, or if the ECS instance is in the classic network, use the public URL instead. - Internet downloads exceeding the free quota are charged. See Billing.
Download commands
Use wget or curl to download backup files from a URL. These tools support resumable download and background execution.
If download speed drops below 64 KB/s, the download may be interrupted. Download on a stable network connection.
To download to a disk mounted with ossfs, adjust the multipart_size parameter. The maximum value is 100 GB. Downloads larger than 100 GB will fail. See ossfs and Common options.Avoid third-party download tools. They may download the file multiple times, generating extra Internet traffic charges.
wget
nohup wget -c -t 0 "<download-url>" -O <local-file-path> > <log-file-path> &Example:
nohup wget -c -t 0 "https://dbs-****.aliyundoc.com/****.tar.gz****" -O /backup/examplebackup.tar.gz > /tmp/download.log &| Parameter | Description |
|---|---|
nohup | Keeps the download running if the session is disconnected. The process exits automatically when the download completes. |
-t 0 | Sets the number of retries to unlimited. |
-c | Enables resumable download. |
-O | Sets the local save path and file name. |
curl
nohup curl -C - --retry 10 "<download-url>" -o <local-file-path> > <log-file-path> &Example:
nohup curl -C - --retry 10 "https://dbs-****.aliyundoc.com/****.tar.gz****" -o examplebackup.tar.gz > /tmp/download.log &| Parameter | Description |
|---|---|
nohup | Keeps the download running if the session is disconnected. The process exits automatically when the download completes. |
--retry 10 | Retries up to 10 times on failure. |
-C - | Enables resumable download. |
-o | Sets the local save path and file name. |
What's next
Use the advanced download feature to export backup data as CSV or SQL files, then restore the data to a self-managed PostgreSQL instance. See Restore the data of an ApsaraDB RDS for PostgreSQL instance to a self-managed PostgreSQL instance by using a CSV file or an SQL file.
API reference
| Operation | Description |
|---|---|
| DescribeBackups | Queries data backup files. |
| DescribeDownloadSupport | Checks whether an instance supports the advanced download feature. |
| CreateDownload | Creates an advanced download task. |
| DescribeDownloadTask | Queries download tasks. |
| DescribeDownloadBackupSetStorageInfo | Queries storage information for a downloaded backup set. |