Symlink options (was Mysterious (bogus?) rsync(d) errors ...)
John Van Essen
vanes002 at umn.edu
Fri May 20 07:00:22 GMT 2005
On Thu, 19 May 2005, Wayne Davison <wayned at samba.org> wrote:
> On Thu, May 19, 2005 at 09:15:01AM -0700, Josh Berkus wrote:
>> John, Wayne,
> :-) Howdy, pardner...
Heh heh heh. :-D
> Previously rsync was skipping the symlinks because you didn't specify
> --links, so --safe-links had no effect. ...
The --safe-links option man page description doesn't say that --links
is required. I thought (as did Josh) --safe-links implied --links.
The SYMLINKS section in the man page doesn't say it's required either.
> ... If you want it to duplicate
> "safe" symlinks and copy "unsafe" links as files, specify --links with
Instead of --safe-links, shouldn't that be --copy-unsafe-links?
AFAICT, --safe-links is for totally ignoring unsafe links.
Of these options:
-l, --links copy symlinks as symlinks
-L, --copy-links copy the referent of all symlinks
--copy-unsafe-links copy the referent of "unsafe" symlinks
--safe-links ignore "unsafe" symlinks
do the last two require --links or --copy-links to be effective?
As I see it, these should be the possible combinations of various
symlink options (--links and --copy-links are mutually exclusive,
as are --copy-unsafe-links and --safe-links):
To duplicate all symlinks:
To duplicate safe symlinks and ignore unsafe symlinks:
To duplicate safe symlinks and copy referents of unsafe symlinks:
To copy referents of all symlinks:
To copy referents of safe symlinks and ignore unsafe symlinks:
(The combination of --copy-links --copy-unsafe-links is redundant,
so I didn't include it.)
If that summary is correct, can it be added to the SYMLINKS section?
If --safe-links is just a modifier, then perhaps a warning that it's
being ignored if --links (or --copy-links) is not present is warranted?
Same for --copy-unsafe-links if --links is not specified?
More information about the rsync