Created
February 3, 2010 15:24
-
-
Save schisamo/293680 to your computer and use it in GitHub Desktop.
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
# pull existing files down | |
rm -rf /tmp/cms | |
scp -i ~/.ssh/id_rsa_storage -rp storage@some_server_ip:/var/backups/mongodb/cms/ /tmp | |
# drop the mongo db | |
/usr/local/mongodb/bin/mongo --eval "db.dropDatabase()" cms | |
# restore your mongo db and collections | |
/usr/local/mongodb/bin/mongorestore -d cms --dir /tmp/cms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment