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