Skip to content

Instantly share code, notes, and snippets.

View servergrove's full-sized avatar

ServerGrove servergrove

View GitHub Profile
@servergrove
servergrove / backup_mysql.sh
Created January 24, 2012 16:13
Script to backup MySQL
# Configuration.
date=`date +%Y-%m-%d`
bk_dest='/var/archives/mysql'
log_file=$bk_dest/bk_mysql-${date}.log
mysql_cmd='/usr/bin/mysql'
mysqldump_cmd='/usr/bin/mysqldump'
dbuser=root
dbpass=`cat /etc/.mysqlpasswd`