All Products
Search
Document Center

ApsaraDB for MongoDB:Restoration solution overview

Last Updated:Sep 19, 2023

ApsaraDB for MongoDB provides many data restoration solutions.

Restore data to ApsaraDB for MongoDB instances

Method

Instance architecture

Scenario

Remarks

Restore data to a new ApsaraDB for MongoDB instance by backup set

  • Standalone instances

  • Replica set instances

Applicable to scenarios where an entire instance needs to be restored but data timeliness is not a key requirement.

A new instance is created based on the backup data and data is restored to the new instance.

  • You do not need to download backup files.

  • The MongoDB 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 zones that support different MongoDB versions, see Limits.

  • The storage space of the new instance must be larger than or equal to the storage space of the original instance.

  • If you upgrade the major version of the original instance, you cannot restore the backup data before the upgrade to a new instance.

  • Instances that have TDE enabled cannot be restored from the recycle bin after they are released.

  • ApsaraDB for MongoDB automatically updates the minor version of the instance to the latest version if the minor version of an ApsaraDB for MongoDB instance expires or is not included in the maintenance list and when you perform some operations. This ensures that the ApsaraDB for MongoDB instance can provide higher performance and stability. For more information, see Database version upgrade, Data migration, Overview, Restore backup data to a new ApsaraDB for MongoDB instance by backup point, Restore backup data to a new ApsaraDB for MongoDB instance by point in time, and Restore one or more databases of an ApsaraDB for MongoDB instance.

Restore data to a new ApsaraDB for MongoDB instance by point in time

  • Replica set instances

  • Sharded cluster instances

Applicable to scenarios where data of multiple databases in an instance or data of the entire instance needs to be restored to a specific point in time.

Restore one or more databases of an ApsaraDB for MongoDB instance

Replica set instances that meet the following requirements:

  • The instances are created after March 26, 2019.

  • The instances are deployed in the China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Hangzhou), China (Shanghai), China (Shenzhen), or Singapore region.

  • The instances run MongoDB 4.2 or earlier.

  • Storage type: SSD cloud disks.

  • The storage engine is WiredTiger.

Applicable to scenarios where one or more databases need to be quickly restored. For example, you can use this solution if you deleted a collection or document by mistake.

Restore data to self-managed databases

To restore data to self-managed databases, you must download the backup files of the ApsaraDB for MongoDB instance to your computer. For more information about how to download backup files, see Download backup files.

Method

Instance architecture

Remarks

Restore logical backup files of ApsaraDB for MongoDB to self-managed databases

  • Replica set instances which run MongoDB 4.2 or earlier and use local SSDs.

  • Sharded cluster instances which run MongoDB 4.2 or earlier and use local SSDs.

The mongorestore tool of an earlier version is not supported in MongoDB of a later version. We recommend that you select a mongorestore version that is compatible with your MongoDB version. For more information, see mongorestore.

Restore data of an ApsaraDB for MongoDB instance to a self-managed MongoDB database by using physical backup

Replica set instances that meet the following requirements:

  • The Transparent Data Encryption (TDE) feature is not enabled. For more information about TDE, see TDE.

  • The storage engine is WiredTiger or RocksDB.

N/A.