All Products
Search
Document Center

ApsaraDB for MongoDB:Download backup files

Last Updated:Feb 06, 2024

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

  1. Log on to the ApsaraDB for MongoDB console.

  2. In the left-side navigation pane, click Replica Set Instances or Sharded Cluster Instances based on the instance type.

  3. In the upper-left corner of the page, select the resource group and region to which the instance belongs.

  4. Click the ID of an instance, or click More icon in the Actions column corresponding to the instance and select Manage.

  5. Obtain the download URL of a backup file.

    1. In the left-side navigation pane of the instance details page, click Backup and Recovery.

    2. Click the Full Backup tab.

    3. Click the More icon in the Actions column of the backup file and select Download.

    4. In the Download Backup dialog box, copy and record the Public Endpoint or Internal Endpoint value.

    5. Click OK.

  6. 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