How to circumvent "Symlink has no referent"?

Kevin Korb kmk at
Fri Jul 12 12:20:00 MDT 2013

Hash: SHA1

You are telling rsync to do something that it can't do because of bad
data.  That makes it an error.

If you have broken symlinks perhaps you should remove them with:
find /path -follow -type l -ls -delete

On 07/12/13 11:33, yetanotheruser at wrote:
> Hi,
> in my backup script I'm using the "-L" option to transform symlinks
> into referent files/dirs. Now I'm also using the "--delete"
> option. Unfortunately "--delete" doesnt work if an error like
> "Symlink has no referent" occurs. So far the only solution for that
> seems to not use the "-L" option or to add "--ignore-errors". It
> doesnt seem very wise to me to use "--ignore-errors", so my
> question is, is there any other way, to just ignore "dead"
> symlinks? I'd just like to copy the referent files if they exist.
> If they don't exist (which would produce the error in the subject),
> I'd like to just copy the symlink.
> Is there any way of doing that? I googled a lot, but it seems to me
> that it is not possible.
> Thanks, Martin

- -- 
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at  (work)
	Orlando, Florida		kmk at (personal)
	Web page:
	PGP public key available on web site.
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -


More information about the rsync mailing list