Crontab & SVN

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Crontab & SVN

Post 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?
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Crontab & SVN

Post by Benjamin »

Try adding the full path to dump.sql in the last line.
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: Crontab & SVN

Post by jaoudestudios »

astions wrote:Try adding the full path to dump.sql in the last line.
You the man! Thanks :)
Post Reply