Dear All,
Following is a simple shell script that I've written in order to upload a file on to a ftp server using "curl". When I run this manually the system compress the files and send the tar ball on to the FTP location without any hassle. However when I put this script on crotab the line containing the ftp upload doesn happen but the tar ball is getting created. Following is the script.
#!/bin/bash
BACKUPDIR=/usr/local/
CONTENT1=/usr/local/etc/squid
BACKUPFILE=squid.backup.`date +%F`
tar -czvf $BACKUPDIR/$BACKUPFILE $CONTENT1
cd $BACKUPDIR
curl -v -T squid.back*
#END
only the curl part doesnt work. I guess this has something to do with the crontab. Can someone help out please? Oh this is how my crontab entry looks and the job is run by root.
10 11 * * * sh /usr/local/sqbkup.sh
Thank you very much.

Reply With Quote
