ApsaraDB for MongoDB provides many data restoration solutions.
Restore the instance data to an ApsaraDB for MongoDB instance
When you restore the instance data to a new instance, take note of the following items:
The major version of the new instance must be the same as that of the original instance. You must select a zone based on the MongoDB version of the original instance. Instances of different MongoDB versions can be deployed in different zones. For more information about the limits on instance architectures, see Limits.
The storage space of the new instance must be larger than or equal to that of the original instance.
The backup data of an instance cannot be restored if the major version of the instance is upgraded after the backup data is generated.
By default, the new instance runs the latest kernel version.
Solution | Instance architecture | Restoration destination | Restoration range | Scenario |
Sharded cluster instance that uses cloud disks | Original instance |
| Applicable to scenarios where a collection or document is accidentally deleted. | |
Replica set or sharded cluster instance that uses local disks and runs MongoDB 3.4, MongoDB 4.0, or MongoDB 4.2 Note For more information about limits such as the region limits, see Limits. | New Instance | |||
| New Instance |
Note You can restore partial databases only in an instance that uses local disks. | Applicable to scenarios where data timeliness is not a key requirement for the data restoration. | |
Replica set instance | New Instance |
Note You can restore partial databases only in an instance that uses local disks. | Applicable to scenarios where the instance data needs to be restored to a previous time point. | |
Sharded cluster instance | New Instance | All databases | ||
| New Instance | All databases | Applicable to scenarios such as data monitoring or disaster recovery. You can use backup files to restore the instance data to a new instance in the region where the files are stored. |
Restore the instance data to a self-managed database
To restore the data of an instance to a self-managed database, you must download the backup files of the instance to your computer. For more information about how to download backup files, see Download backup files.
Solution | Instance architecture | Remarks |
Restore the instance data to a self-managed MongoDB database by using logical backup |
| The mongorestore tool of an earlier version is not supported for ApsaraDB for MongoDB instances of later versions. We recommend that you select a mongorestore version that is compatible with the MongoDB version of your instance. For more information, see mongorestore. |
Restore the instance data to a self-managed MongoDB database by using physical backup | Replica set instance that meets the following requirements:
| N/A |