All Products
Search
Document Center

ApsaraDB for MongoDB:Back Up MongoDB Data Manually

Last Updated:Jan 21, 2026

Create an on-demand backup of your ApsaraDB for MongoDB instance to protect your data at a specific point in time.

Prerequisites

Ensure you have created a standalone, replica set, or sharded cluster instance.

Usage notes

Compatibility

If you're running MongoDB earlier than 4.0 and plan to use physical backup, be aware of this limitation: backups may fail when your instance contains more than 10,000 collections and indexes combined.

Solution: Upgrade to MongoDB 4.0 or later before performing physical backups. See Upgrade the major database version for instructions.

Warning

After upgrading, you cannot use pre-upgrade backups to create new instances.

Backup storage

ApsaraDB for MongoDB stores all backups in Object Storage Service (OSS), so they don't consume your instance's storage space.

Backup methods

Snapshot Backup

Available for:

  • Standalone instances

  • Replica set instances (cloud disk, MongoDB 4.2 or later)

  • Sharded cluster instances (cloud disk, MongoDB 4.2 or later)

How it works: Captures your disk's exact state at a specific moment, enabling rapid restore (typically within minutes).

Note

Snapshot backup uses I/O resources during the backup process.

Logical and Physical Backups

Available for:

  • Replica set instances (local disk, MongoDB 4.2 or earlier)

  • Sharded cluster instances (local disk, MongoDB 4.2 or earlier)

Logical Backup

Uses mongodump to record database operations. Restores data by replaying these operations.

Physical Backup

Copies raw database files directly. Faster backup and restore than logical backup.

Note
  • Both backup types run on a hidden node, so they don't impact your primary and secondary nodes.

  • Large datasets may take considerable time to back up.

Costs

ApsaraDB for MongoDB includes generous free backup storage quotas. You're only charged for backup storage that exceeds your free quota, calculated hourly using this formula: Hourly backup cost = (Total backup storage - Free quota) × Unit price.

View your current backup storage usage and free quota allocation:

Storage type

Free quota

View backup storage and free quota

Cloud disk instances

200% of your purchased storage capacity

View your current backup storage usage and free quota on the Basic Information page, under the Specification Information section.

Local disk instances

50% of your purchased storage capacity

Backup storage pricing for usage beyond your free quota:

Storage type

Unit price of backup (USD per GB-day)

Cloud disk-based instances

The unit price varies in different regions:

  • Regions in the Chinese mainland: 0.0009375

  • China (Hong Kong) and regions outside China: 0.001125

Local disk-based instances

The unit price varies in different regions:

  • Regions in the Chinese mainland: 0.00375

  • China (Hong Kong) and regions outside China: 0.0045

For detailed pricing information, visit the ApsaraDB for MongoDB Pricing page.

Warning

Prices shown are for reference only. Actual billing rates are determined at purchase time and reflected in your bills.

Create a Manual Backup

  1. Open the ApsaraDB for MongoDB console and navigate to your instance:

    • For replica sets: Replica Set Instances.

    • For sharded clusters: Sharded Cluster Instances.

  2. Select your region and resource group in the upper-left corner, then click your instance ID.

  3. Click Back Up Instance in the upper-right corner of the Basic Information page.

  4. In the Back Up Instance dialog:

    • Backup Method: Select your preferred method (shown based on your instance type).

    • Backup Retention Period: Choose how long to keep this backup:

      • Default: Uses the same retention as automatic backups.

      • Custom: Set a specific duration (7-730 days).

      • Permanent: Keeps the backup for the instance's lifetime.

    Note

    Only cloud disk instances running MongoDB 4.2 or later support custom retention for manual backups.

  5. Click OK.

    The backup begins immediately. Refresh the page and go to the Backup and Restoration tab to view your backup.

FAQ

How can I view backup storage charges for my instance?

Navigate to the Bill Details page and look for the Backup Storage Size billable item to view your backup-related charges.

Can I manually delete backup files to reduce costs?

Backup files cannot be deleted manually. However, the system automatically deletes backups after they exceed the retention period you configure. To reduce backup storage costs, adjust your backup policy by reducing the backup frequency or shortening the retention period. For detailed instructions, see Procedure.

Related API

API Operation

Description

Creates a manual backup of your instance