Created
December 20, 2010 11:34
-
-
Save christo16/748279 to your computer and use it in GitHub Desktop.
mysqldump script
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
#mysql info | |
HOST=127.0.0.1 | |
USER=root | |
PASS=1234 | |
DB=database | |
#gzip which | |
GZIP="$(which gzip)" | |
# Get data in dd-mm-yyyy format | |
NOW="$(date +"%d-%m-%Y")" | |
#file name | |
FILE="/backup/acn_prod.$NOW.gz" | |
mysqldump --opt --user=$USER --password=$PASS --host=$HOST $DB | $GZIP -9 > $FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment