All Products
Search
Document Center

ApsaraDB for MongoDB:Configure manual backup for an instance

Last Updated:Nov 04, 2024

This topic describes how to configure manual backup for an ApsaraDB for MongoDB instance.

Prerequisites

An ApsaraDB for MongoDB standalone instance, replica set instance, or sharded cluster instance is created.

Usage notes

If the engine version of your ApsaraDB for MongoDB instance is earlier than MongoDB 4.0 and the backup method is physical backup, physical backups may fail when the total number of collections and indexes in the instance exceeds 10,000. Before you implement a physical backup, upgrade the engine version of your instance to MongoDB 4.0 or later. For more information, see Upgrade the major version of an ApsaraDB for MongoDB instance.

Important

After the upgrade, instance backup files that were generated before the upgrade cannot be used to create instances.

Background information

ApsaraDB for MongoDB stores backup files in Object Storage Service (OSS) instead of ApsaraDB for MongoDB instances.

The following table describes the backup methods for ApsaraDB for MongoDB instances of different architectures and engine versions.

Instance architecture

Backup method

Description

  • Standalone instances

  • Replica set instances that run MongoDB 4.2 or later and use cloud disks

  • Sharded cluster instances that run MongoDB 4.2 or later and use cloud disks

Snapshot backup

Snapshot backup retains disk data at a specific point in time and can be used to restore the data within minutes.

Note

Snapshot backup occupies the I/O resources of ApsaraDB for MongoDB instances.

  • Replica set instances that run MongoDB 4.2 or earlier and use local disks

  • Sharded cluster instances that run MongoDB 4.2 or earlier and use local disks

  • Logical backup

  • Physical backup

  • Logical backup: The mongodump tool is used to store the operation records of databases in a logical backup file. This method restores data in the form of playback commands during restoration.

  • Physical backup: Physical database files of an ApsaraDB for MongoDB instance are backed up. This method provides faster backup and restoration than logical backup.

Note
  • Logical and physical backups take place in the hidden node of an ApsaraDB for MongoDB instance, and the read and write performance of the primary and secondary nodes is not affected.

  • If you use logical or physical backup to back up large amounts of data, the backup may take a long period of time.

Billing rules

ApsaraDB for MongoDB provides free backup quotas. If your backup storage (full backup and log backup) falls within the free quota, you are not charged fees. For the excess backup storage, you are charged backup fees on an hourly basis. The backup fees are calculated based on the following formula: Backup fees per hour = (Backup storage - Free quota) × Unit price for backup files.

The following table describes the billing details.

Storage type

Free quota

View backup storage and free quota

Instances that use cloud disks

The free quota is equal to 200% of the storage that you purchase for your instance.

You can view the backup storage and free quota in the Specification Information section of the Basic Information page of your instance.

Instances that use local disks

The free quota is equal to 50% of the storage that you purchase for your instance.

The following table describes the billing details of the excess backup storage.

Storage type

Unit price of backup (USD per GB-day)

Instances that use cloud disks

The unit price varies in different regions:

  • Regions in the Chinese mainland: 0.0009375

  • China (Hong Kong) and regions outside the Chinese mainland: 0.001125

Instances that use local disks

The unit price varies in different regions:

  • Regions in the Chinese mainland: 0.00375

  • China (Hong Kong) and regions outside the Chinese mainland: 0.0045

For more information, go to the Pricing tab of the ApsaraDB for MongoDB product page.

Warning

The unit price of backup is for reference only. The unit price may change when you purchase an instance. The unit price generated in purchase inquiries and bills shall prevail.

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.

  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 the instance that you want to manage or click Manage in the Actions column corresponding to the instance.

  5. In the upper-right corner of the instance details page, click Back up Instance.

  6. In the Back up Instance panel, set Backup Method.

  7. Click OK.

    After you manually back up the instance, refresh the page and then view the generated backup file on the Backup and Recovery page.

FAQ

How do I view the fees incurred for instance backup?

You can view the bills of the Backup Storage Size billable item on the Billing Details tab of the Bill Details page.

Related API operations

Operation

Description

CreateBackup

Allows you to manually back up the data of an ApsaraDB MongoDB instance.