I'm trying to run a mysql backup that simply does a dump and puts the results into a directory. Here is the script:
#!/bin/sh
mysqldump -u root -p******(mysql password) --all-databases > /home/e-smith/files/ibays/Primary/files/backup/backup.sql
cat file | mail myemail@hotmail.com -s "Backup Successful"
Now, if I run that script from command line, it runs just fine. The backup is done, the sql file appears where it should, and I get the email.
What I can't get to happen is for cron to be able to run this script. I have the cron job setup, it runs. I can see that in the cron logs.
Jul 14 23:30:00 SMESERVERNAME CROND[13856]: (root) CMD (root /home/e-smith/files/ibays/Primary/files/backup/backup.sh)
But no backup happens, and of course no error messages that I can pin this on. I have all the proper permissions set, owners, and group. They are all set to 755 or even 777, and the file is owned by root. The cron job is set to run as root. Here is the cron job:
30 23 * * * root /home/e-smith/files/ibays/Primary/files/backup/backup.sh
And, like I said, if I run it from the command line it runs just fine.
What the heck am I missing????