This question is old, but I'll leave a more complete answer here in case anyone else has this issue.
Let's start with the simplest and most general approach.
In almost all cases, the best option would be to use the -a (--archive) switch. This approach will "follow symlinks" and reproduce them, exactly, in the destination dir.
rsync -a /files/ user@server:/files/
Some background: the -a|--archive switch is an alias for the following switches: -rlptgD
- (-r|--recursive): recurse into directories
- (-l|--links): copy symlinks as symlinks
- (-p|--perms): preserve permissions
- (-t|--times): preserve times
- (-g|--group): preserve group
and the -D switch is, itself, an alias of the following switches:
- (--device): preserve device files (requires root)
- (--specials): preserve special files
Using rsync with the -a switch will duplicate all file types, sub directories, and symlinks exactly as they exist in the source directory.
If, instead, you want symlinked files and dirs to be converted to actual files & dirs--while maintaining the sane archive settings included in "-a"--you can append the -L switch (so it will take precedence over -l or use -rLptgD).
rsync -aL /files/ user@server:/files/
This approach is, arguably, a safer/saner version of the -LK switches in other answers.
However, if the goal is to preserve internal symlinks (whose targets are within the source dir tree) and include the actual files and dirs when symlinks are external, then a different approach is needed. In bash (and related shells?) something like this would work:
#!/bin/bash
src="./source"
dest="./dest"
rsync -a --save-links ${src} ${dest}
abs_src="$(realpath -- ${src})"
for i in $(find ${src} -type l); do
target="$(target="$(readlink -f -- $i)" && echo "${target%/*}")"
while [[ $target && ( ! $abs_src -ef $target ) ]]; do target="${target%/*}"; done
test ! ${target} && rsync -aL ${i} ${i/$src/$dest}
done