This topic provides an overview of the solutions to migrate and synchronize data to or from an ApsaraDB for MongoDB database in different scenarios.

Data migration solutions

By using Data Transmission Service (DTS), you can fully or incrementally migrate the data of a MongoDB database. This can achieve smooth data migration from a MongoDB database to the cloud without affecting businesses.

ApsaraDB for MongoDB supports full data migration by using the official mongodump and mongorestore tools.

In addition, ApsaraDB for MongoDB allows you to migrate data from the Cloud to an on-premises database by using a physical or logical backup file.

Migration scenario Source database architecture Documentation
Migrate data from a self-mamanged or on-premises database to Alibaba Cloud Standalone instance Migrate self-managed standalone MongoDB databases to Alibaba Cloud by using DTS
Migrate self-managed MongoDB databases to standalone instances by using tools provided by MongoDB
Replica set instance Migrate the replica set of a user-created MongoDB database to ApsaraDB for MongoDB by using DTS
Migrate self-managed databases to Alibaba Cloud by using tools provided by MongoDB
Sharded cluster instance Migrate a user-created sharded MongoDB database to ApsaraDB for MongoDB by using DTS
Migrate a self-managed MongoDB database to ApsaraDB for MongoDB by using tools provided by MongoDB
Migrate data from a database on a third-party cloud platform to Alibaba Cloud N/A Migrate data from Amazon DynamoDB to ApsaraDB for MongoDB by using mongoimport
Replica set or sharded cluster instance
Migrate data between ApsaraDB for MongoDB instances Replica set instance Migrate data from a replica set MongoDB 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 created by different Alibaba Cloud accounts
Migrate data from an ApsaraDB for MongoDB instance to a self-managed or on-premises MongoDB database Replica set instance Restore data of an ApsaraDB for MongoDB instance to self-managed MongoDB databases by using logical backup
Restore data of an ApsaraDB for MongoDB instance to a self-managed MongoDB database by using physical backup

Data synchronization solutions

You can use the MongoShake tool developed by Alibaba Cloud to synchronize data between MongoDB databases.

Synchronization scenario Tool Documentation
Synchronize data to an existing instance MongoShake Use MongoShake to implement one-way synchronization between ApsaraDB for MongoDB replica set instances