from time to time, I need to export data from one environment into another environment, each environment is on a different server with different authentication. For instance: I am building a script to export data from PROD env to import to UAT env.
So far my flow will be like this:
People says the MongoClient should be a singleton in Application. So I feel my design is not appropriate. How to properly use the mongoClient to migrate data from one server to another server?
Many thanks
MongoClient should be a singleton for a cluster, so 2 clusters - then 2 singletons. However lools like mongodump
/mongorestore
suit better here in my opinion