Hi,
In my backup script I have noticed nothing gets deleted on the remote
end even though I have --delete and --delete-excluded. Did I miss
anything obvious here?
rsync -azC
-e ssh
--relative
--one-file-system
--sparse
--numeric-ids
--vP
$IGNORE ## a long list of --exclude patterns
--delete
--delete-excluded
--bwlimit=0
--backup
--suffix=''
--backup-dir=$REMOTE_ROOT/$BACKUP_HOST/$TODAY
/{etc,home,var/lib,var/cvs,usr/local}
backup.host.com:$REMOTE_ROOT/$BACKUP_HOST/current
% rsync --version
rsync version 2.5.4 protocol version 26
Copyright (C) 1996-2002 by Andrew Tridgell and others
<http://rsync.samba.org/>
Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchfiles, IPv6,
64-bit system inums, 64-bit internal inums
Also, is there any way at all to make --exclude patterns
case-insensitive? Or do I have to write '*.[eE][xX][eE]' etc.?
Thanks in advance, cheers,
--
ARICIE: Cruel, si de mes pleurs m?prisant le pouvoir,
Vous consentez sans peine ? ne plus me revoir,
Partez, s?parez-vous de la triste Aricie.
(Ph?dre, J-B Racine, acte 5, sc?ne 1)
> In my backup script I have noticed nothing gets deleted on the remote > end even though I have --delete and --delete-excluded. Did I miss > anything obvious here?Not sure if this applies to you, but... One thing I noticed about trying to use --delete in combination with -b --backup-dir is that files do not get deleted if there is already another hard link to them on the target side. As I understand it, this is not so much a bug in rsync as it is a somewhat non-intuitive POSIX behavior in my operating system (Linux). Basically, if it can, backup just renames the file instead of copying it. But on my system, if a and b are both hard links to the same inode, mv a b does *not* unlink a! It has no effect, in fact. My solution was to make two rsync passes, the first with -b --backup-dir but no --delete, the second without -b --backup-dir but with --delete. At some point, though, maybe we should patch rsync to make it do the intuitive thing in this case. Does anyone else have experience with this? Regards, Mike