mysql backup script

make WITH_CHARSET=gbk WITH_XCHARSET=all WITH_LINUXTHREADS=yes WITHOUT_INNODB=yes
————————–
www# vi mysql_backup.sh
#!/bin/sh
# change into the backup_agent directory where data files are stored.
cd /usr/database_backup
/usr/local/bin/mysqldump –opt –user=ken –password=ling –all-databases > /usr/database_backup/all.sql
bzip2 -9 all.sql
mv all.sql.bz2 all-$(date +%Y%m%d-%H%M%S).bz2

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.