Created
April 27, 2012 08:00
-
-
Save dagvadorj/2507220 to your computer and use it in GitHub Desktop.
Dump a MongoDB collection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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