I am somewhat new to MongoDB but I do have some experience with MySQL and PostgreSQL. Currently, I need to migrate Mongo DB from one site to another. The sites should be identical (development and production) but the production ran a bit forward in terms of content so we want to make sure they are mirroring each other. How do I do it? The mongo is run on the CentOS Linux system. Will this be as easy as doing a dump and restore? Or is there more involved?

  • Are we talking of the data? Quite some legislations prohibit the use your customers data for other things than processing their orders / service requests / etc. If this isn't a concern, use mongodump on a secondary, since this prevents almost any impact on your production environment. – Markus W Mahlberg Aug 28 '15 at 9:54

I think just -- exporting db and taking out the json file and import in another system.

Or You can directly copy the db from one location to another---- http://docs.mongodb.org/manual/reference/method/db.copyDatabase/

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.