Open Side Menu Go to the Top
Register
Question about MongoDB Question about MongoDB

04-20-2016 , 11:04 AM
I am just starting to learn MongoDB and modern web like NodeJS etc. Previously I was using PHP and MySQL.

My question is, once you have a full database on your development machine, how do you then move that to a production environment? Is there a good way to set it up to make it easy to move?

My server is a DigitalOcean server so not GUI there at all.

Previously I just used phpMyAdmin to export the database and then import into the production server. Since there is not a go to ease GUI and I am struggling a bit to figure this out. I am used to GUI interfaces and everything today seems to be CLI, which I am trying to force my self to get used to instead of trying to find GUI interfaces. Any help would be great. Thanks.
Question about MongoDB Quote
04-20-2016 , 12:08 PM
Mongo comes with tools that can be used to dump and restore databases (mongoexport / mongoimport)
Question about MongoDB Quote
04-25-2016 , 02:01 PM
Use putty or whatever tool to login to your DigitalOcean server. Install the same version of Mongo there as on your dev machine. Then you can do as RustyBrooks suggests and export your data to that machine (probably through FTP).
Question about MongoDB Quote
04-25-2016 , 02:22 PM
thanks guys, I will try that and see what happens.
Question about MongoDB Quote
04-30-2016 , 03:09 AM
Quote:
Originally Posted by RustyBrooks
Mongo comes with tools that can be used to dump and restore databases (mongoexport / mongoimport)
mongoimport does not like multiple line imports. I was trying to do something in a shell script with mongoimports... If i split up a multiple file import into separate files it worked fine but it ABSOLUTELY NOT WORK trying to import multiple json files in a single shell script. fwiw, this was in Windows. Maybe that issue is restricted to Windows only. I dunno since I never found a solution.
Question about MongoDB Quote

      
m