I am getting this message with rsync:

symlink has no referent: "/a/path"

Well, rsync is right: in the source filesystem, the (symbolic) link is pointing to a non-existent location. That is intended. The target of the link only exists in the destination filesystem. And I want rsync to ignore that fact and create the symlink in the destination.

How can I force rsync to do that?

1 Answer 1


Use -a option with rsync.

It will copy the broken symlinks too.

Something like this:

 # rsync -av source host:destination
  • 19
    I am using -L to create copies of files instead of copying symlinks. Like "rsync -a -L" If a symlink points to missing file, rsync would fail with "symlink has no referent" error. Is there a way to skip copying broken symlinks when -L option set?
    – SoichiH
    Commented Dec 1, 2017 at 13:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .