I use this (crafted her myself, modified as to not show all of my sites, since it can get extensive):
[root@server code]# cat backup.c
# Create Backups with Today's Date
tar -cvpzf /home/backups/code/temp/ugn-`date '+%d-%B-%Y'`.tgz /home/ugn/
tar -cvpzf /home/backups/code/temp/mysql-`date '+%d-%B-%Y'`.tgz /var/lib/mysql/
# Change permissions on the above files to local user.
chown -R backups:backups /home/backups/code/temp/
# Upload Data
/home/backups/code/temp
ncftpput -R -b -DD -P 2121 -f /home/backups/remotebackup.conf /data /home/backups/code/temp
# Email user with completion
echo "The monthly backup of critical domains has been completed" | mail -s "Monthly Backup Completed" owned.ugn
Basically:
Backs up webspace.
Backs up Database
Changes owner to the backup user.
Uploads to my home machine.
Deletes the backup on the server.
Emails me that its complete.
Now here my "backup MySQL" backs up the mysql data directory directly; you could easily just program in your MySQL dump paramaters in its place.