On 17/09/16 17:12, Clive Menzies wrote:
WORKING version:
# Good rsync options for uhuru_backups.
rsync_opts="-av --exclude-from=exclude_list --delete
--delete-excluded"
The exclude_list is a file with one excluded directory per line with
an asterisk at the end directory name.
$rsync $rsync_opts $password Uhuru::rsync \
/root/uhuru_backup/uhuru/home/ > /var/rsync/uhuru.$NOW.log
The daily backup script works fine when run manually as sudo but doesn't
complete when run as a root cronjob. I know the script starts because it
creates a log. When successful it gives a list of files copied but when
run as a cronjob it's blank (0 bytes)
$ sudo crontab -l
20 21 1 * * /root/uhuru_backup/uhuru.monthly.sh > /dev/null
25 21 * * 7 /root/uhuru_backup/uhuru.weekly.sh > /dev/null
30 21 * * * /root/uhuru_backup/uhuru.daily.sh > /dev/null
This should be impossible but I've got the same issue on two backup servers.
Regards
Clive
--
Clive Menzies
http://freecriticalthinking.org