I have a simple shell script that runs Rsync. It runs fine if I call it manually from the command line, but when I set it up as a CRON job I get the following error:
rsync: failed to open exclude file exclude.txt: No such file or directory (2) rsync error: error in file IO (code 11) at exclude.c(1000) [client=2.6.8]
I use the following in the shell script:
The file exists and the script runs fine (honoring the exclusions) when run manually. The shell script being called by the CRON job and exclude.txt are in the same directory.
The entire script I'm trying to run looks like this:
rsync -avrhgo --exclude-from 'exclude.txt' --progress --stats --delete-excluded -e "ssh -p XXXXX" / XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX