[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Crontab doesn't complete a script - SOLVED



On 19/09/16 22:10, Clive Menzies wrote:
It didn't find the exclude_list I created. I modified the script to point to it but clearly the syntax is not right

# Good rsync options for uhuru_backups.
rsync_opts="-av --exclude-from=exclude_list --delete --delete-excluded"

# exclude list location:
        exclude_list=/root/uhuru_backup/exclude_list

echo "Currently at line 17">>$log_file

The log reported thus:
/root/uhuru_backup/uhuru.daily.sh: line 17: $log_file: ambiguous redirect
rsync: failed to open exclude file exclude_list: No such file or directory (2)
rsync error: error in file IO (code 11) at exclude.c(1179) [client=3.1.1]

D'oh! I searched around a bit and realised I'd over-complicated it.

This works :-)

# Good rsync options for uhuru_backups.
    rsync_opts="-av --exclude-from=/root/uhuru_backup/exclude_list \
         --delete --delete-excluded"

Thanks Thomas, I'd still be going round in circles.

Regards

Clive

--
Clive Menzies
http://freecriticalthinking.org


Reply to: