ApsaraDB for MongoDB allows one or more databases to be restored. This topic describes how to restore one or more databases of an ApsaraDB for MongoDB instance.
Prerequisites
- The instance must meet the following requirements:
- The instance is a replica set instance.
- The instance is deployed in the China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Hangzhou), China (Shanghai), China (Shenzhen), or Singapore (Singapore) region. Databases in other regions cannot be restored.
- The database version of the instance is 3.4, 4.0, or 4.2. If the database version
of the instance is outdated, you can upgrade the database version. For more information
about how to upgrade the database version, see Upgrade MongoDB versions.
Note After the database version is upgraded, the backup files of the source instance cannot be used to restore data to the new instance.
- The storage engine of the instance is WiredTiger.
- Backup files contain the databases to be restored. For example, if you want to restore the test database, the test database must be included in the backup files.
Precautions
- You can restore one or more databases only from physical backups, but not from logical
backups. If your instance runs MongoDB 3.4 and the total number of collections and
indexes in your instance exceeds 10,000, physical backups may fail. Before you implement
a physical backup, upgrade the database version of your instance to MongoDB 4.0 or
later. For more information about how to upgrade the database version, see Upgrade MongoDB versions.
Note After the database version is upgraded, the backup files of the source instance cannot be used to restore data to the new instance.
- The time required to restore one or more databases varies based on factors such as the data volume, task queue status, and network conditions. When the state of the new instance changes to Running, the restoration is complete.
- 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.
Billing
When you restore one or more databases, the system creates an instance and you are charged for this instance. For more information, see Billable items and pricing.