This topic describes how to manually back up an ApsaraDB for MongoDB instance.
Prerequisites
A standalone, replica set, or sharded cluster instance is created.
Usage notes
If your ApsaraDB for MongoDB instance runs a version earlier than MongoDB 4.0 and you select Physical Backup as the backup method, the backup may fail if the total number of collections and indexes in the instance exceeds 10,000. Before you perform a physical backup, upgrade your instance to MongoDB 4.0 or a later version. For more information, see Upgrade the major version of an instance.
After you upgrade the database version, backups created before the upgrade cannot be used to create instances.
Description of manual backup
ApsaraDB for MongoDB stores backup files in Object Storage Service (OSS). These backup files do not use the storage space of your MongoDB instance.
The following table describes the backup methods supported by different types of ApsaraDB for MongoDB instances.
Instance type | Backup method | Description |
| Snapshot Backup | Retains the data status of a disk at a specific point in time. This method can be used to restore data within minutes. Note The backup process consumes I/O resources of the ApsaraDB for MongoDB instance. |
|
|
Note
|
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 |
Cloud disk-based instance | 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. |
Local disk-based instance | 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) |
Cloud disk-based instances | The unit price varies in different regions:
|
Local disk-based instances | The unit price varies in different regions:
|
For more information, go to the Pricing tab of the ApsaraDB for MongoDB product page.
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
Go to the Replica Set Instances page or the Sharded Cluster Instances page. In the upper-left corner, select a resource group and a region. Then, click the ID of the target instance.
In the upper-right corner of the Basic Information page, click Back Up Instance.
In the Back Up Instance panel, select a Backup Method.
In the dialog box that appears, select a Backup Retention Period and click OK.
NoteOnly cloud disk-based instances that run MongoDB 4.2 or later support custom retention policies for manual backups.
The following retention policies are available:
Default: The retention period is the same as that specified in the automatic backup policy.
Custom: Specify a custom retention period for the manual backup. Valid values: 7 to 730 days.
Permanent: The manual backup is retained for the lifetime of the instance. For example, you can perform a manual backup at the beginning of each week or month and set the retention policy to Never Expire to retain the backup data for a long time.

After you manually back up the instance, refresh the page. Then, on the Backup and Restoration page, you can view the generated backup file.
FAQ
Related API operations
API operation | Description |
Manually backs up an ApsaraDB for MongoDB instance. |