Skip to content

Instantly share code, notes, and snippets.

@teamday
Last active November 4, 2017 08:41
Show Gist options
  • Save teamday/6deeaaeed5df4ca6c91e2cefa97d6b6e to your computer and use it in GitHub Desktop.
Save teamday/6deeaaeed5df4ca6c91e2cefa97d6b6e to your computer and use it in GitHub Desktop.
www & db backup script
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