'Duplicate data from Mongo Atlas to self-managed mongodb

I need to duplicate records about 400 million records from Atlas Mongodb to self-managed Mongodb without any changes. After finishing migrating data, these 2 databases also need to be synchronous.

I tried to use MongoSourceConnect with Kafka, but it took too much time to duplicate the data. I would try to export data from Atlas and import to the database, then we setup the MongSourceConnect with Kafka. However I am afraid that I would lost some data during migration process.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source