Potential incompatibilities between '--delete' and --copy-unsafe-symlinks' ???

Wayne Davison wayned at samba.org
Sun Aug 25 10:25:46 MDT 2013

On Sat, Aug 24, 2013 at 3:19 PM, <freedman at systems.cs.cornell.edu> wrote:

> In particular, I've been having long-standing issues (just now
> getting around to trying to resolve them) when I use rsync
> with '--copy-unsafe-links' alongside the '--delete' parameter.  If I
> use either of these two parameters in isolation (along with other
> shared parameters), I get the expected behavior.  However, when I
> use '--copy-unsafe-links', rsync no longer properly deletes files that
> are present in the destination, but not in the source.

Be sure to check the errors from the rsync run.  I'd imagine that one of
your unsafe symlinks is bogus, and you will be getting a pair of errors:

symlink has no referent: "/some/path"
IO error encountered -- skipping file deletion

Because a bogus dereferenced symlink can't be replaced with a file, it is
left out of the transfer. This would cause the receiving side to delete
that missing file (symlink) in the destination directory if deletions were
allowed to continue.  Rsync currently prevents that from happening by
turning off file deletions.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20130825/344b4956/attachment.html>

More information about the rsync mailing list