Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Having read through the rsync manpage, I can't see any way for rsync to automagically transform absolute symlinks between machines, i.e

Server A
file -> /home/username/path/file

Server B
file -> /home/differentusername/path/file

Any ideas (bearing in mind that the rsync would only be run under /home/username/)?

share|improve this question
I assume using relative symlinks is not an option? – andol Jul 25 '10 at 19:10
I'll put it this way, I'd ideally like to do it without :) – Andrew Bolster Jul 25 '10 at 19:29
up vote 3 down vote accepted

Would this information lead to a solution?

From man rsync:

. . .

If you want to duplicate a server-side symlink, include both the symlink via its path, and referent directory via its real path.

. . .

It is also possible to limit the amount of path information that is sent as implied directories for each path you specify. With a modern rsync on the sending side (beginning with 2.6.7), you can insert a dot and a slash into the source path, like this:

rsync -avR /foo/./bar/baz.c remote:/tmp/

That would create /tmp/bar/baz.c on the remote machine. (Note that the dot must be followed by a slash, so “/foo/.” would not be abbreviated.)

. . .

[omitted some information regarding earlier versions of rsync]

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.