ApsaraDB for MongoDB supports both automatic and manual backup. You can restore data from a backup file or to a specific point in time. Backup files are stored in Object Storage Service (OSS) to reduce the storage usage of your instance. For more information about OSS, see What is OSS?
Back up your instance
Configure backup in the ApsaraDB for MongoDB console:
-
Configure automatic backup — runs on a schedule without manual intervention
-
Create a manual backup — triggered on demand
Automatic backup supports physical backup only.
Backup methods by instance type
Available backup methods and their performance impact vary by instance type and MongoDB version.
| Instance type | Backup method | Performance impact |
|---|---|---|
| Standalone instance | Snapshot backup | Affects the I/O performance of the instance |
| Replica set or sharded cluster instance (MongoDB 4.2 or earlier, local disks) | Physical backup | Runs on hidden nodes — no impact on primary or secondary node read/write performance. Large datasets may require extended backup time. |
| Replica set or sharded cluster instance (MongoDB 4.2 or earlier, local disks) | Logical backup | Uses mongodump to back up each database |
| Replica set or sharded cluster instance (MongoDB 4.2 or later, cloud disks) | Snapshot backup | Runs on secondary and hidden nodes — no impact on primary node read/write performance |
Backup method definitions:
-
Snapshot backup: A point-in-time backup of disk data.
-
Physical backup: Backs up the physical data files of an instance.
-
Logical backup: Uses
mongodumpto back up each database.
Restore your instance
ApsaraDB for MongoDB provides multiple restoration options, including restoring from a backup file and point-in-time recovery. For the full list of options, see Restoration solutions.