Last active
November 4, 2017 08:41
-
-
Save teamday/6deeaaeed5df4ca6c91e2cefa97d6b6e to your computer and use it in GitHub Desktop.
www & db backup 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
DATE=`date +%F` | |
mysqldump --defaults-file=/root/.my.web1.cnf -h 10.13.0.4 -u username dbname | gzip -9 > /backup/dbname-${DATE}.sql.gz | |
cd /srv/www/ | |
tar cf - webstie1folder | gzip -9 > /backup/website1-${DATE}.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment