I'm using the
dry-run (-n) option of
rsync to compare directories on two different systems. Everything works fine with standard files and directories. However, when I use a directory that includes symbolic links, I get errors:
> ls -l /usr/user1/server10s/system/ total 1 lrwxrwxrwx 1 localuser other 37 Jun 19 17:18 nrcalc -> /usr/user2/nrcalc10s > rsync -n -avrc /usr/user1/server10s/* aisdba@Server:deployment_area/server building file list ... done system/ cannot delete non-empty directory: system/nrcalc could not make way for new symlink: system/nrcalc template/ template/nrcalc sent 190 bytes received 24 bytes 38.91 bytes/sec total size is 330 speedup is 1.54 rsync error: some files could not be transferred (code 23) at main.c(692)
I'm quite happy that it can't delete the directory, as I'm not actually trying to change anything, but why is it even trying to? BTW, I've tried adding both the
-l (links) and the
-K (copy links) options, with no effect.
How can I get this comparison to work even with symlinks in the directory structure?