PolarDB lets you download backup files from cluster backup sets to your local system. You can use these files for long-term storage, historical data queries, transferring backups to other services such as Object Storage Service (OSS), and auditing.
You cannot directly restore downloaded backup data to a PolarDB for MySQL cluster. You can restore the downloaded backup files to a self-managed MySQL database.
Release date
November 24, 2023
The backup file download feature is in phased release and will be rolled out gradually.
Billing
The backup file download feature lets you download files using a URL or by transferring them to your Object Storage Service (OSS). Files downloaded using a URL are temporarily stored in DBS Storage. The billing method depends on the download destination, as described in the following sections:
If a download task fails, no fees are charged.
Go to the PolarDB console. Under , you can view the Monthly Backup Compute Data Volume and Monthly Outbound Internet Traffic for your cluster.
Storage fees
URL: Files are temporarily stored in DBS Storage. No storage fees are charged.
OSS: Files are transferred to your OSS. For more information about storage fees, see Object Storage Service storage fees.
Backup set conversion fees
Regardless of whether the download destination is a URL or OSS, conversion fees are charged for converting backup sets to SQL, CSV, Parquet, or CSV-with-header format. No free quota is available for format conversion. The pricing rate is USD 0.03125 per GB.
Traffic fees
URL:
Internal network download: Free.
Internet download: A free quota of 500 GB per month is provided for each cluster. Traffic that exceeds the free quota is billed on a pay-as-you-go basis. Charges are calculated daily based on the amount of data downloaded. For more information about pricing, see Network fees.
NoteYou can purchase a subscription network plan to offset the network traffic fees for downloading backups over the Internet. A network plan with a larger capacity provides a higher discount.
OSS: Files are transferred to your OSS. For more information about traffic fees, see Object Storage Service traffic fees.
Prerequisites
Cluster: Only Enterprise Edition clusters of the Cluster series support the backup file download feature.
Region: 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, US (Silicon Valley), US (Virginia), and Germany (Frankfurt).
NoteThe feature will be available in other regions soon.
Others:
The RAM user must have permissions to download backup files. For more information about how to grant permissions to a RAM user, see RAM user permissions.
The backup data is not encrypted. You cannot download backup files from encrypted PolarDB clusters.
A cluster or instance can have only one download task at a time. You cannot start a new task if a previous task is running or has failed.
Limits
You can export most table structures. However, some structural information cannot be exported:
Supported for export: column information, primary key index, non-primary key indexes, unique index, partitioned table information, table engine, and table-level or database-level character sets and collations.
Not supported for export: expression indexes, foreign keys, generated columns, hidden columns, views, functions, stored procedures, system variables, and triggers.
Fields of spatial data types are not supported. If the data contains fields of the following types, the conversion task fails:
GEOMETRY, POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, GEOMETRYCOLLECTION
The exported files do not include the following system databases:
information_schema, mysql, performance_schema, sys, __recycle_bin__
If you select OSS as the download destination, the OSS bucket must use the Standard storage class. To convert the storage class, see Convert storage classes.
NoteYou must create an OSS bucket manually. If you have already created a bucket to store backup files, ignore this step.
The backup file download feature supports downloading only level-1 backup data. It does not support downloading level-2 backup data.
If cold data archiving is enabled for the cluster, you cannot download backup sets.
If the names of the databases or tables to be downloaded contain a forward slash (/), the task fails.
Procedure
(Recommended) Use the console
Log on to the PolarDB console. In the navigation pane on the left, click Clusters. Select the region where the cluster is located, and then click the ID of the target cluster.
In the navigation pane on the left, click .
On the Data Backup List tab, find the target backup set and click Download Cluster Backup in the Actions column.
NoteBy default, the console displays backup data from the last 8 days. To view backups older than 8 days, change the time range.
If the Download Cluster Backup button is not displayed, check whether your cluster's edition or region meets the prerequisites.
In the Download Point-in-time and Backup Set step, select Download by Point-in-time or Download by Backup Set, and then click Next at the bottom left of the page.

In the Download Instance and Database/Table step, click Next at the bottom left of the page. Instance Download is selected by default.
In the Download Destination and Format step, select the download destination and format, and complete the configuration.
ImportantWe recommend that you select OSS as the download destination because it is faster.
You cannot cancel a backup download task after it starts.
Backup download tasks incur fees. For more information, see Billing.
(Recommended) OSS
If you select OSS as the download destination, the data is written directly to your OSS bucket. You can delete the data as needed after you use it.
Enter the OSS bucket name and a directory prefix, such as xx/xx.
NoteYou must create an OSS bucket manually. If you have already created a bucket to store backup files, you can enter its name directly.
The storage class of the OSS bucket must be Standard. For more information about how to convert the storage class, see Convert storage classes.
Select a download format. You can set the download format to CSV, SQL, Parquet, or CSV-with-header.
Read and select the checkbox to agree to the terms. Click Complete. The page automatically redirects to the Backup Download List tab. Wait for the download task to complete.
NoteThe backup file download feature requires you to grant Database Backup Service (DBS) the permissions to access your cloud resources. If you have not granted the permissions, follow the prompts on the console to click . After the authorization is successful, return to the advanced download configuration page and complete the configuration.
The conversion process competes for computing resources on the server side. A download may fail because of a temporary resource allocation failure. Downloads can also fail because of unsupported data formats. If a task fails, you can retry the download task or contact the DBS helpdesk.
No fees are charged for failed tasks.
View the backup file. If the task status is Successful, the download is complete. You can go to the corresponding OSS bucket to view the file.
URL
If you select URL as the download destination, the system temporarily stores the converted data in DBS Storage. No storage fees are charged for this process.
NoteDownloading by URL involves data packaging and requires extra waiting time. The time required depends on the logical size of the backup set. If the logical backup size is large, such as more than 1 TB, we recommend that you download the backup to OSS.
Select a download format. You can set the download format to CSV, SQL, Parquet, or CSV-with-header.
Read and select the checkbox to agree to the terms. Click Complete. The page automatically redirects to the Backup Download List tab. Wait for the download task to complete.
NoteThe backup file download feature requires you to grant DBS the permissions to access your cloud resources. If you have not granted the permissions, follow the prompts on the console to click . After the authorization is successful, return to the advanced download configuration page and complete the configuration.
The conversion process competes for computing resources on the server side. A download may fail because of a temporary resource allocation failure. Downloads can also fail because of unsupported data formats. If a task fails, you can retry the download task or contact the DBS helpdesk.
No fees are charged for failed tasks.
View the backup file. If the task status is Successful, the download is complete. Click Generate Link in the Download Destination column. Set the Validity Period for the link and click Generate Link. You can then download the backup data using the generated internal or public network link.
NoteYou can obtain the download link within three days after the task is complete. The link is valid for 5 minutes to 1 day. The default validity period is 2 hours.
Completed tasks expire after three days, and the download link also expires. After a task expires, its data is automatically deleted. If you need the data, start a new download task to obtain a new link.
Save the download link immediately to prevent it from being leaked.
Using third-party software to download backup files may cause extra network traffic and lead to additional charges. Use such software with caution. For more information about specific download methods, see Download commands.
API operations
DescribeDownloadSupport: Query whether your cluster supports the backup file download feature.
NoteIf the API response indicates that the feature is not supported, check whether your cluster's edition or region meets the prerequisites.
CreateDownload: Create a backup file download task.
NoteThe backup file download feature requires you to grant DBS the permissions to access your cloud resources (the
AliyunDBSDefaultRolepermission). If you have not granted the permissions, you can first grant them in the console.When TargetType (download destination type) is set to OSS, you must first create the corresponding bucket manually. The storage class of the OSS bucket must be Standard.
When TargetType (download destination type) is set to URL, keep the returned
TaskId(task ID) parameter to obtain the download link.You cannot cancel a backup download task after it starts.
Backup download tasks incur fees. For more information, see Billing.
(Optional) DescribeDownloadTask: View the information about the backup file download tasks of the current cluster, including the task status.
Obtain the backup file:
If the download destination type is OSS, the system writes the data directly to your OSS. You can view the data in the corresponding bucket.
If the download destination type is URL, you can use DescribeDownloadBackupSetStorageInfo to obtain the download link.
NoteYou can obtain the download link within three days after the task is complete. The link is valid for 5 minutes to 1 day. The default validity period is 2 hours.
Completed tasks expire after three days, and the download link also expires. After a task expires, its data is automatically deleted. If you need the data, start a new download task to obtain a new link.
Save the download link immediately to prevent it from being leaked.
Using third-party software to download backup files may cause extra network traffic and lead to additional charges. Use such software with caution. For more information about specific download methods, see Download commands.
