Skip to content

Instantly share code, notes, and snippets.

@yuki24
Created September 15, 2011 08:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuki24/1218845 to your computer and use it in GitHub Desktop.
Save yuki24/1218845 to your computer and use it in GitHub Desktop.
Useful Commands for MongoDB
# dump
mongodump --host localhost:27017 --db db_name --out /path/to/dump
# restore
mongod --port 27017 --drop --dbpath /path/to/dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment