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

The instance is a replica set instance that runs MongoDB 4.2 or earlier or a sharded cluster instance.
Note This feature is not supported for replica set instances that run MongoDB 5.0 or 4.4 or standalone instances.

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 upper-left corner of the page, select the resource group and the region of the target instance.
  3. In the left-side navigation pane, click Replica Set Instances, or Sharded Cluster Instances based on the instance type.
  4. Find the target instance and click its ID.
  5. Obtain the download URL of a backup file.
    1. In the left-side navigation pane, click Backup and Recovery.
    2. Click the Full Backup tab.
    3. Click More icon in the Actions column corresponding to a 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 the Public Endpoint value.

      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 the Internal Endpoint value.
      The download method varies based on your operating system. In the following examples, the Windows and Linux operating systems are used:
      • Windows operating system

        Paste the copied public endpoint into the address bar of your browser, and then press the Enter key to start the automatic download.

      • Linux operating system
        Run the following command to download the backup file:
        wget -c '<Internal endpoint of the backup file>' -O <Custom name of the backup file>.<File name extension>
        Note
        • <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