Mongo - RamonPradoMoreno/learned-at-work GitHub Wiki
Useful commands
- Kill server:
mongo admin --eval "db.shutdownServer()" - Create db:
use hola - Add document to db:
db.movie.insert({"name":"tutorials point"}) - Dump all databases, with users and in only one file:
mongodump --gzip --archive=/tmp/shared/dump.gz - Restore all databases from previous dump:
mongorestore --gzip --archive=/tmp/dump.gz