ApsaraDB for MongoDB provides multiple data restoration solutions for different scenarios.
Restore data to an ApsaraDB for MongoDB instance
Before you restore data to a new instance, consider the following:
-
The new instance must have the same major database version as the source instance. You must select a zone that supports this version. The available zones vary by database version. For more information about zone-related limits, see Usage notes.
-
The storage capacity of the new instance must be greater than or equal to that of the source instance.
-
If you upgrade an instance's major version, backups created before the upgrade cannot be restored to the new version.
-
By default, a new instance created for data restoration runs the latest kernel minor version.
|
Solution |
Instance architecture |
Restoration destination |
Restoration range |
Scenario |
|
Restore one or more databases of an ApsaraDB for MongoDB instance |
|
Original instance |
|
Use this solution to recover accidentally deleted collections or documents. |
|
Replica set instance that uses local disks and runs MongoDB 4.0 or 4.2 Note
For more information about limits, such as the supported regions, see Usage notes. |
New instance |
|||
|
New instance |
Note
Only instances that use local disks support partial database restoration. |
This solution is for scenarios where data timeliness is not a high priority. |
|
|
Replica set instance |
New instance |
Note
Only instances that use local disks support partial database restoration. |
Use this solution to restore instance data to a specific point in time. |
|
|
Sharded cluster instance |
New instance |
All databases |
||
|
New instance |
All databases |
This solution supports data compliance and disaster recovery. It lets you restore a backup file to a new instance in the region where the cross-region backup is stored. |
Restore data to a self-managed database
To restore data to a self-managed database, you must first download the backup file of your ApsaraDB for MongoDB instance. For instructions, see Download a backup file.
|
Solution |
Instance architecture |
Usage notes |
|
Because MongoDB is continuously updated, older mongorestore versions may not be compatible with newer database versions. Always use a mongorestore version that is compatible with your MongoDB version. For more information, see mongorestore. |
|
|
Replica set instance that meets the following conditions:
|
None. |