Created
February 9, 2017 21:31
-
-
Save NegativeFeedback/8c6a3f8c8249b1081f3d71793521ef16 to your computer and use it in GitHub Desktop.
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 | |
now=$(date +'%Y-%m-%d_%H.%M.%S') | |
mkdir -p backups/$now | |
cd backups/$now | |
mongodump | |
cd .. | |
zip -r $now.zip $now | |
cd ../.. | |
echo "\nBACKUP DONE." | |
echo "Backup is at directory backups/${now}." | |
echo "Backup is also archived to .zip file backups/${now}.zip" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment