Created
November 2, 2016 03:58
-
-
Save AJNOURI/630b3cdb45b4a160f96d0abeb02ab37e to your computer and use it in GitHub Desktop.
Restore the latest mongodb or a particular one from the argument.
This file contains 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
#!/bin/bash | |
if [ "$1" = "" ] ; then | |
mongorestore /backup/mongodb-latest/ | |
else | |
mongorestore /backup/mongodb-$1/ | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment