rsync will not recursively delete a directory on the destination file system when the -x flag is used and the source is a symlink on a different file system. This is inconsistent with the behaviour seen when rsync'ing between directories in the same context. Commands to reproduce: mkdir /testing mount -t tmpfs -o size=1M,nr_inodes=1000,mode=0700 tmpfs /testing mkdir /testing/bar ln -s /testing/bar /testing/foo mkdir --parents /tmp/foo/bar/baz rsync -arvx --delete --force /testing/foo /tmp Result: sending incremental file list cannot delete non-empty directory: foo could not make way for new symlink: foo sent 41 bytes received 12 bytes 106.00 bytes/sec total size is 12 speedup is 0.23 rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1060) [sender=3.0.7]
I've just checked in a fix for this. The device number of the destination wasn't being stored w/o --delete, so the removal would fail the same-device check.
*** Bug 8057 has been marked as a duplicate of this bug. ***