You could be missing environment variable(s) in the cron
environment. Put a command like
env > /…/cron_env.txt
into your backup.sh
, and compare the output to that of an env
that you run when you’re logged in.
Also, you might try adding 2> /…/mysqldump_error.txt
to your mysqldump
command, to capture the error messages.