On 17/09/16 13:32, Mike Bird wrote
$rsync $rsync_opts $password FileServer::rsync \
/home/backup/home/ > /var/rsync/FileServer.$NOW.log
I don't see where the $excludes you built is actually used.
On 17/09/16 13:44, Clive Menzies wrote:
The script wasn't changed and I've always assumed the $rsync-opts took
care of this. The script was copied from someone else and adapted.
# Good rsync options for FileServer_backups.
rsync_opts="-av --delete --delete-excluded"
Thanks to prompting by Mike, I've changed the way excludes are handled
and it works :-)
OLD version:
# Good rsync options for uhuru_backups.
rsync_opts="-av --delete --delete-excluded"
<snip>
# A list of files and directories that do not need to be backed up
exclude_list="music funstuff cma/TransitStuff lost+found/"
excludes=""
for exclude in $exclude_list; do
excludes="$excludes --exclude=$exclude"
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.
Regards
Clive
--
Clive Menzies
http://freecriticalthinking.org