Backup MySQL Simple

#!/bin/sh

## Options de backup
opts="--skip-opt --event --triggers --routines --quick --extended-insert --create-options --set-charset --disable-keys"

# pour chaque base sauf performance_schema

for DBNAME in `mysql -u root -ppassword -B -e "show databases;" | sed 1d | grep -v performance_schema`
do
# on fait le backup et on compresse
        /usr/bin/mysqldump $opts -u root -ppassword $DBNAME | bzip2 > /mnt/mysql_backup/$DBNAME-$(date +%d%m%Y).sql.bz2
done