Use this rsync command:
rsync -vrtil --copy-unsafe-links --log-file=(logfile) (source_dir) (dest_dir)
to:
keep symlinks on the local system relative
for absolute links (i.e., starting with "/"), copy the file/dir that the symlink is pointing to (that is, the "referent") to the destination.
Example of #1:
In this example, there's 2 files on the source side, the symlink and the file being linked to (that is, the "referent", which is docs_home.htm):
(prompt): ls -al docs*
-rwxr-sr-x 1 (owner) (group) 8853 Jul 31 2019 docs_home.htm
lrwxrwxrwx 1 (owner) (group) 13 May 31 2019 docs_home.html -> docs_home.htm
On the destination (aka target) side, after running the above rsync command, you get:
(prompt): ls -al docs*
-rwxr-sr-x 1 (owner) (group) 8853 Jul 31 2019 docs_home.htm
lrwxrwxrwx 1 (owner) (group) 13 May 31 2019 docs_home.html -> docs_home.htm
Example of #2:
On the source side, there's a link that looks like this:
lrwxrwxrwx 1 (owner) (group) 59 Sep 14 2011 Document13.pdf -> /projects/proj_name/proj_subdir/Document13.pdf
On the destination ("target") side, after running the rsync command above, the file itself has been copied, as this snippet of the result of running "ls -al" shows:
-rwxrwxr-x 1 (owner) (group) 45874 Sep 14 2011 Document13.pdf