I want to convert my mongodb from atlas to a local database

Hey Y’all,

so I started my webapp using mongodb atlas, and the product requirements for my customer requires a local database so I must switch from cloud to local. does anyone have experience doing this? I am currently using the mern stack (mongodb, express js, react, and node js)

This should be pretty straight forward. Once you decide where the local/on-prem MongoDB will run just get a mongodump from Atlas and mongorestore it into the new cluster. Then change your MongoDB URI in the app and you should be all set.

Asya

3 Likes

Does live migration work in reverse?

im not worried so much about the data because I am still in development, product isn’t deployed yet - just using mock data so I don’t need the old data
but yes @nchan that is a good question

and @Asya_Kamsky thank you for your help, I am fairly new to the MERN stack and js/mongo in general so I’ll use this thread if I have any further questions as far as my backend setup goes for my project, but I should be okay. thank you

Live migration is currently only supported from a source replica set or sharded cluster to a MongoDB Atlas cluster. There are a lot of moving parts to coordinate for a successful live migration.

I suggest creating a feature suggestion on the new MongoDB Feedback site so others can upvote and subscribe to updates.

Regards,
Stennie

@Stennie_X Thanks! I did not think it would but I was curious, we used it to go on prem to Atlas, it was nice.
thanks!

Live migration doesn’t work for non Atlas targets. I thought mongomirror could help with live migration data from Atlas to on-prem, but it didn’t.