Created
February 25, 2014 09:33
-
-
Save Ulv/9205744 to your computer and use it in GitHub Desktop.
git pre-commit hook - backup mysql database on every commit
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
#!/usr/bin/bash | |
# бэкап mysql базы при каждом коммите | |
FILENAME=/home/www/intinity/klumbariy/db/`date +%d-%m-%Y-%H-%I-%S`.mysql | |
mysqldump intinity_klumba -u klumba \ | |
-p2UDRyHqedqnSfFfW > ${FILENAME} | |
git add $FILENAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment