Skip to content

Instantly share code, notes, and snippets.

@dagvadorj
Created April 27, 2012 08:00
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