If you want to retain ApsaraDB for MongoDB data for a long time, back up the data, and then download it to your computer or restore it to a self-managed database. This feature is applicable to scenarios such as business testing or data analysis. This topic describes how to download a backup file.
Prerequisites
Only the backup files of instances that run MongoDB 4.2 or earlier and use local disks can be downloaded.
Limits
This feature is supported for physical backup and logical backup but not for snapshot backup.
Procedure
Log on to the ApsaraDB for MongoDB console.
In the left-side navigation pane, click Replica Set Instances or Sharded Cluster Instances based on the instance type.
In the upper-left corner of the page, select the resource group and region to which the instance belongs.
Click the ID of an instance, or click in the Actions column corresponding to the instance and select Manage.
Obtain the download URL of a backup file.
In the left-side navigation pane of the instance details page, click Backup and Recovery.
Click the Full Backup tab.
Click the icon in the Actions column of the backup file and select Download.
In the Download Backup dialog box, copy and record the Public Endpoint or Internal Endpoint value.
Click OK.
Download the backup file.
Download the backup file by using Public Endpoint
Paste the copied public endpoint into the address bar of your browser, and then press the Enter key to start the automatic download.
Download the backup file by using Internal Endpoint
The download method varies based on operating systems. In the following examples, the Windows and Linux operating systems are used:
Windows
Paste the copied internal endpoint into the address bar of your browser, and then press the Enter key to start the automatic download.
Linux
Run the following command to download the backup file:
wget -c '<Internal endpoint of the backup file>' -O <Custom name of the backup file>.
Parameters in the preceding command:
<Internal endpoint of the backup file>
: the internal endpoint that is used to download the backup file.<Custom name of the backup file>
: the name that you want to use for the backup file, such as backupfile.<File name extension>
: the extension of the backup file.
Example:
wget -c 'http://rdsbak-hz-v3.oss-cn-hangzhou-internal.aliyuncs.com/custins5475****/hins1907****_data_20210906103710_qp.xb?Expires=......' -O backupfile._qp.xb