If I change a direcotry to a symlink with the same name on the source rsync produces an error: % mkdir -p foo/bar/foo bar % rsync -a -v foo/ bar/ building file list ... done ./ bar/ bar/foo/ sent 90 bytes received 20 bytes 220.00 bytes/sec total size is 0 speedup is 0.00 % rm -rf foo/bar % ln -s foo foo/bar % rsync -a -v foo/ bar/ building file list ... done ./ rsync: delete_file: rmdir "/tmp/1/bar/bar" failed: Directory not empty (39) rsync: symlink "/tmp/1/bar/bar" -> "foo" failed: File exists (17) sent 90 bytes received 20 bytes 73.33 bytes/sec total size is 3 speedup is 0.03 rsync error: some files could not be transferred (code 23) at main.c(702)
That's a safety feature. Either use --force to force a recursive delete of directories that are in the way of non-directories, or enable --delete (if appropriate for your situation).