This topic provides an overview of the solutions to migrate and synchronize data to or from an ApsaraDB for MongoDB database in different scenarios.
Impacts
If the minor version of an instance expires or is not included in the maintenance list, ApsaraDB for MongoDB automatically updates the minor version of the instance to the latest version when you perform the following operations. This ensures the performance and stability of the instance.
Limits
Standalone instances do not support incremental data migration and synchronization.
Data migration solutions
You can use the following methods to migrate the data of an ApsaraDB for MongoDB database:
ImportantStandalone instances do not support incremental data migration.
Use Data Transmission Service (DTS) to fully or incrementally migrate the data of an ApsaraDB for MongoDB database. This can achieve smooth data migration from an ApsaraDB for MongoDB database to the cloud without affecting businesses. For more information about DTS, see What is DTS?
ImportantDTS cannot be used to migrate data of MongoDB 6.0 instances.
Use the official MongoDB tools of mongodump and mongorestore to fully migrate data of an ApsaraDB for MongoDB database.
Use a physical or logical backup file to migrate data of an ApsaraDB for MongoDB database to an on-premises database.
The following table describes data migration methods in different scenarios.
Migration scenario
Source instance architecture
References
Migrate data from a self-managed MongoDB database to an ApsaraDB for MongoDB instance
Standalone or replica set instance
Sharded cluster instance
Standalone instance
Replica set instance
Sharded cluster instance
Migrate data from a MongoDB database hosted on a third-party cloud to an ApsaraDB for MongoDB instance
Replica set or sharded cluster instance
Migrate data between ApsaraDB for MongoDB instances
Replica set instance
Migrate data from a replica set instance to a sharded cluster instance
Standalone instance
Migrate data from a standalone instance to a replica set or sharded cluster instance
Standalone or replica set instance
Migrate data between ApsaraDB for MongoDB instances of different Alibaba Cloud account
Standalone, replica set, or sharded cluster instance
Migrate data between ApsaraDB for MongoDB instances across regions
Migrate data from an ApsaraDB for MongoDB instance to a self-managed or on-premises MongoDB database
Replica set instance
Data synchronization solutions
You can use the following methods to synchronize the data of an ApsaraDB for MongoDB database:
ImportantStandalone instances do not support data synchronization.
Use DTS to synchronize data between MongoDB databases.
ImportantDTS cannot be used to synchronize data of MongoDB 6.0 instances.
You can use the MongoShake tool developed by Alibaba Cloud to synchronize data between ApsaraDB for MongoDB instances.
The following table describes data synchronization methods in different scenarios.
Synchronization scenario
Tool
References
Synchronize data between instances
DTS
Synchronize data to an existing instance
MongoShake