How to circumvent "Symlink has no referent"?

yetanotheruser at yetanotheruser at
Fri Jul 12 09:33:41 MDT 2013


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.


More information about the rsync mailing list