On 19/09/16 12:31, Thomas Schmitt wrote:
The classic remedy would be to set the missing variables inside the
cronjob script.
/root/uhuru_backup/uhuru.daily.sh
Consider to put some "echo" commands into the script and direct them to
a log file:
log_file=/tmp/uhuru_daily_sh.log
...
echo "Currently at: ..." >>$log_file
...
This should give you an idea what part of the script causes the premature
end.
Thanks Thomas
I confess, I've not originated scripts before and so am on a steep
learning curve. Your suggestion was very useful but my implementation is
poor. It did yield useful information though.
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]
Regards
Clive
--
Clive Menzies
http://freecriticalthinking.org