Does anyone know how I can export the application database in meteor? I use robomongo to see it but how do I export that database? I need if you could help thanks!
Just make a full backup of it. Here’s how you go about that:
-
You need the Mongo CLI, which comes with the standard Mongo installation - follow the instructions here. Don’t worry, it won’t affect your local Meteor db:
-
Create a full dump of the Meteor database. Make sure that your application running, then in a different shell window type:
mongodump -h 127.0.0.1 --port 3001 --db meteor --out /tmp/my_mongo_backup
-
To restore, just do:
mongorestore --drop --db meteor /tmp/my_mongo_backup
Carefull with the --drop
option, as it wipes out the destination database. See more in the docs.
1 Like