Rafael Diaz Valdes wrote:

Hi,

I 'm using mysqldump to backup my database, I wrote in my backup.sh the following string:

$MYSQL/bin/mysqldump --opt databasename -user=root --password=rootpassword > 
backup/mysql/databasename.sql

I include backup.sh in my cron weekly (/etc/cron.weekly) but when it is 
executed  appear databasename.sql empty, else if I run backup.sh in a shell 
konsole it is executed ok,

do you know why can not execute the string in the cron ??

my mysql version is : 4.0.17

regards rafael


Hi Rafael,

Check the value of the variable $MYSQL. It is probably not being set by cron and should be set in your shell script. Cron starts with only a couple of variables set and you have to start everything else.

Are you getting any output from the cron daemon? It should be in the logs somewhere or else emailed to root.

Regards

--

David Logan
South Australia

when in trouble, or in doubt
run in circles, scream and shout


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to