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 from instances that run MongoDB 7.0. For the support of DTS for databases, DTS-related documents shall prevail. For more information, see Supported databases.
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.
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
Standalone instance
Standalone or replica set instance
Migrate data between ApsaraDB for MongoDB instances of different Alibaba Cloud accounts
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 ApsaraDB for MongoDB instances.
ImportantYou cannot use DTS to synchronize data between instances that run MongoDB 7.0. For the support of DTS for databases, DTS-related documents shall prevail. For more information, see Supported databases.
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
Synchronization tool
References
Synchronize data between instances
DTS
Synchronize data to an existing instance
MongoShake
Use MongoShake to perform one-way synchronization between ApsaraDB for MongoDB instances