Skip to content

Instantly share code, notes, and snippets.

@kmila
Created September 18, 2013 15:33
Show Gist options
  • Save kmila/6610978 to your computer and use it in GitHub Desktop.
Save kmila/6610978 to your computer and use it in GitHub Desktop.
mongodb_debug
db.setProfilingLevel(2) -> debug mode
db.system.profile.find().sort({$natural:-1}); -> example with first line representing last execution
db.setProfilingLevel(0) -> disables debug mode
db.coll_name.help()
mongoexport --collection coll_name --out /tmp/dump.json --db db_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment