PolarDB lets you download backup files from cluster backup sets to your local machine. Use downloaded files for long-term storage, historical data queries, transferring backups to Object Storage Service (OSS), or auditing.
Downloaded backup data cannot be restored directly to a PolarDB for MySQL cluster. To use the data in PolarDB, first restore the backup files to a self-managed MySQL database, then use DTS to migrate the data back.
The backup file download feature was released on November 24, 2023 and is being rolled out gradually.
How it works
Downloading a backup file involves these steps:
Verify that your cluster meets the prerequisites.
In the PolarDB console or via API, create a download task and choose a download destination (OSS or URL).
Wait for the conversion task to complete.
Retrieve the backup file from your OSS bucket or generate a download link.
Prerequisites
Before you begin, make sure that:
Cluster edition: Your cluster is an Enterprise Edition cluster of the Cluster series.
Region: Your cluster is deployed in one of the supported 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, US (Silicon Valley), US (Virginia), or Germany (Frankfurt).
The feature will be available in other regions soon.
RAM permissions: Your RAM user has permissions to download backup files. See RAM user permissions.
Encryption: The cluster's backup data is not encrypted. Encrypted clusters do not support backup file download.
Concurrent tasks: No download task is currently running or has failed for this cluster. Only one download task per cluster is allowed at a time.
Billing
The feature supports two download destinations: URL and OSS. Fees vary by destination.
Failed download tasks are not charged. To monitor your usage, go to the PolarDB console and navigate to Settings and Management > Backup and Restoration > Backup Download List. There you can view the Monthly Backup Compute Data Volume and Monthly Outbound Internet Traffic for your cluster.
Backup set conversion fees
Converting backup sets to SQL, CSV, Parquet, or CSV-with-header format is charged at USD 0.03125 per GB, regardless of download destination. No free quota applies.
Storage fees
URL: Files are temporarily stored in Database Backup Service (DBS) Storage. No storage fees apply.
OSSThe pricing rate is USD 0.03125 per GB.: Standard OSS storage fees apply. See Object Storage Service storage fees.
Traffic fees
URL — internal network: Free.
URL — Internet: 500 GB free per cluster per month. Traffic beyond the free quota is billed daily on a pay-as-you-go basis. See Network fees. To offset Internet traffic costs, purchase a network plan—larger plans offer higher discounts.
OSS: Standard OSS traffic fees apply. See Object Storage Service traffic fees.
Limitations
Expression indexes, foreign keys, and other structural elements are not exported: Items not supported for export include expression indexes, foreign keys, generated columns, hidden columns, views, functions, stored procedures, system variables, and triggers.
Spatial data type fields cause task failure: If the data contains fields of these types, the conversion task fails:
GEOMETRY,POINT,LINESTRING,POLYGON,MULTIPOINT,MULTILINESTRING,MULTIPOLYGON,GEOMETRYCOLLECTION.System databases are excluded: The following system databases are not included in the export:
information_schema,mysql,performance_schema,sys,__recycle_bin__.OSS bucket must use Standard storage class: If the bucket uses a different storage class, convert it to Standard before starting a download task.
Create the OSS bucket manually before starting the task. If you already have a bucket, skip this step.
Level-2 backup data cannot be downloaded: Only level-1 backup data is supported. Level-2 backup data is not.
Cold data archiving blocks download: If cold data archiving is enabled for the cluster, backup sets cannot be downloaded.
Forward slashes in names cause task failure: If any database or table name contains a forward slash (
/), the task fails.
Supported table structure elements (for reference): 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.
Download backup files using the console
Step 1: Locate the backup set
Log on to the PolarDB console. In the left navigation pane, click Clusters. Select the region where the cluster is located, then click the cluster ID.
In the left navigation pane, click Settings and Management > Backup and Restoration.
On the Data Backup List tab, find the target backup set and click Download Cluster Backup in the Actions column.
- By default, the console shows backup data from the last 8 days. To view older backups, change the time range. - If Download Cluster Backup is not displayed, check whether your cluster's edition and region meet the prerequisites.

Step 2: Select download scope
In the Download Point-in-time and Backup Set step, select Download by Point-in-time or Download by Backup Set, then click Next.

In the Download Instance and Database/Table step, click Next. Instance Download is selected by default.
Step 3: Configure the download destination
In the Download Destination and Format step, select a download destination and format.
Important- OSS is faster and recommended for large backup sets. - A download task cannot be cancelled after it starts. - Download tasks incur fees. See Billing.
Option 1 (recommended): Download to OSS
Data is written directly to your OSS bucket. Delete it after use if no longer needed.
Enter the OSS bucket name and a directory prefix, such as
xx/xx.- The bucket must already exist. Create one if needed. - The bucket's storage class must be Standard. To convert it, see Convert storage classes.
Select a download format: CSV, SQL, Parquet, or CSV-with-header.
Agree to the terms and click Complete. The page redirects to the Backup Download List tab.
Wait for the task to complete. When the task status changes to Successful, go to the OSS bucket to retrieve the file.
- If you haven't granted DBS permission to access your cloud resources, follow the console prompts to click Go to Authorize > Confirm Authorization, then return to complete the configuration. - If a task fails due to temporary resource allocation issues or unsupported data formats, retry the task or contact the DBS helpdesk. Failed tasks are not charged.
Option 2: Download via URL
Data is temporarily stored in DBS Storage. No storage fees apply for this option.
URL downloads require packaging the data, which takes extra time proportional to the logical backup size. For backup sets larger than 1 TB, OSS is the better choice.
Select a download format: CSV, SQL, Parquet, or CSV-with-header.
Agree to the terms and click Complete. The page redirects to the Backup Download List tab.
Wait for the task to complete. When the task status changes to Successful, click Generate Link in the Download Destination column.
Set the Validity Period and click Generate Link. Use the generated internal or public network link to download the backup data.
- If you haven't granted DBS permission to access your cloud resources, follow the console prompts to click Go to Authorize > Confirm Authorization, then return to complete the configuration. - If a task fails, retry or contact the DBS helpdesk. Failed tasks are not charged. - The download link is available for three days after the task completes. The link's validity period ranges from 5 minutes to 1 day, with a default of 2 hours. - Tasks expire after three days and their data is automatically deleted. If you need the data after expiration, create a new download task. - Save the download link immediately to prevent leakage. - Third-party download tools may download the file multiple times, generating extra Internet traffic and charges. Use
wgetorcurlinstead. See Download commands.
Download backup files using the API
Use the following DBS API operations in sequence:
[DescribeDownloadSupport](https://www.alibabacloud.com/help/en/dms/developer-reference/api-dbs-2021-01-01-describedownloadsupport) — Check whether your cluster supports backup file download.
If the response indicates the feature is not supported, verify that your cluster's edition and region meet the prerequisites.
[CreateDownload](https://www.alibabacloud.com/help/en/dms/developer-reference/api-dbs-2021-01-01-createdownload) — Create a backup file download task.
- Grant DBS the
AliyunDBSDefaultRolepermission before calling this API. If not yet granted, do so via the console first. - IfTargetTypeis OSS, create the bucket manually beforehand. The bucket must use the Standard storage class. - IfTargetTypeis URL, save the returnedTaskIdto retrieve the download link later. - A task cannot be cancelled after it starts. - Download tasks incur fees. See Billing.(Optional) [DescribeDownloadTask](https://www.alibabacloud.com/help/en/dms/developer-reference/api-dbs-2021-01-01-describedownloadtask) — View download task information, including task status.
Retrieve the backup file:
OSS: Data is written directly to your OSS bucket. View it in the corresponding bucket.
URL: Call [DescribeDownloadBackupSetStorageInfo](https://www.alibabacloud.com/help/en/dms/developer-reference/api-dbs-2021-01-01-describedownloadbackupsetstorageinfo) to get the download link.
- The download link is available for three days after the task completes. The link's validity period ranges from 5 minutes to 1 day, with a default of 2 hours. - Tasks expire after three days and their data is automatically deleted. Create a new task if you need the data after expiration. - Save the download link immediately to prevent leakage. - Third-party download tools may generate extra Internet traffic charges. Use
wgetorcurlinstead. See Download commands.
