I haven't found any postings on this in an internet search and the empirical 
behavior doesn't seem to match what's described in the man page. The system is 
running rsync version 3.1.3  protocol version 31.


I created a test directory and tried several rsync parameters (such as -a). 
After working through the error messages that were generated, the following did 
not generate errors.

rsync -rLkHtUuv --log-file=abc_test.txt ~/a/b/ c >& abc_err.txt



Within the source directory is a symlink that points to another file within the 
same directory.

~/a/b/test_link -> ~/a/b/linked_file



The above rsync options correctly change the symlink to a file whose content is 
the same as the target file. So, these rsync options are operating as expected.



Where I get behavior that doesn't seem to match documentation is when I try to 
keep symlinks as symlinks.

rsync -rltUv --log-file=abc_test.txt ~/a/b/ c >& abc_err.txt



In the copied directory, the symlink that was in the original directory has 
been omitted and the symlink has not been replaced by the target file. I get 
similar behavior with rsync -a.



Since the target and symlink are in the same directory, my understanding from 
the man page is that rsync should copy the symlink as a symlink. Any 
suggestions for how to preserve symlinks that are within the directory 
structure being copied? Thanks.

-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to