Skip to content

Instantly share code, notes, and snippets.

@AJNOURI
Created November 2, 2016 03:58
Show Gist options
  • Save AJNOURI/630b3cdb45b4a160f96d0abeb02ab37e to your computer and use it in GitHub Desktop.
Save AJNOURI/630b3cdb45b4a160f96d0abeb02ab37e to your computer and use it in GitHub Desktop.
Restore the latest mongodb or a particular one from the argument.
#!/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