Backing up 30 DB's with .sh script using mysqldump. 27 DB's backups succeed and are the same size each day but 3 DB's do not and seem to just stop randomly part way through the dump with no errors.
Here is the script
#!/bin/bash appname=myapp dbname=mydb dbuser=myuser dbpass=mypass datestamp=`date +%d%m%y` rm -f /var/backups/* > /dev/null 2>&1 mysqldump -u$dbuser -p$dbpass $dbname > /var/backups/$dbname-$datestamp.sql && gzip /var/backups/$dbname-$datestamp.sql tar -zcf /var/backups/data-$datestamp.tar.gz /var/www/data > /dev/null 2>&1 tar -zcf /var/myapp-backups/myapp-$datestamp.tar.gz /var/www/myapp > /dev/null 2>&1
I have checked the failing DB's with Mysqlcheck and everything seems fine so now I am not sure where to look for errors
There is no errors my the var/log/mysql and there is an error.log written today at 06.32 which would be around the right time the cron runs but its empty
Any ideas Thanks