Page 1 of 1

Crontab & SVN

Posted: Fri Jan 30, 2009 12:58 pm
by jaoudestudios
I wrote a bash script to do a database dump then commit the sql file to the repository.

If I run the bash script from the command line it works fine. But when I run it from the crontab only half/part of the bash file works.

The database dump works fine, but the SVN commit does not succeed and I get no errors.

The 3 line script is...

Code: Select all

# SQL DUMP ##########
DUMPFILE="/var/www/vhosts/********.com/private/******/dump.sql"
mysqldump -u **** -p**** -h LOCALHOST ******* > $DUMPFILE
#
# SVN #############
svn commit dump.sql -m "FORUM: automated mysqldump backup (dump.sql)" >> log
 
Any ideas?

Re: Crontab & SVN

Posted: Fri Jan 30, 2009 1:11 pm
by Benjamin
Try adding the full path to dump.sql in the last line.

Re: Crontab & SVN

Posted: Fri Jan 30, 2009 3:40 pm
by jaoudestudios
astions wrote:Try adding the full path to dump.sql in the last line.
You the man! Thanks :)