Skip to content

Instantly share code, notes, and snippets.

@dagvadorj
Created April 27, 2012 08:00
Show Gist options
  • Save dagvadorj/2507220 to your computer and use it in GitHub Desktop.
Save dagvadorj/2507220 to your computer and use it in GitHub Desktop.
Dump a MongoDB collection
mongodump -h [server]:[port] -u [user] -p [password] -d [db]
export d=$(date +'%Y-%m-%d')
tar -czf $d.tgz dump
rm dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment