I have this dbbackup.sh in my /root folder which contains:
Code:
fecha=`date +%Y-%m-%d`
mkdir /var/.backupsql/bd-$fecha
rsync -a -p -o -g /var/lib/mysql/vb/ /var/.backupsql/bd-$fecha/.
and an entry in the crontab telling it to run daily at 4am
Code:
0 4 * * * /root/backup.sh > /dev/null
In my experience, mysqldump was slower than this procedure, and so far (almost a year now) I haven't had any complications with corrupted tables whatsoever.