[ILUG] Weirdness with rsync and symlinks
Niall O Broin
niall at linux.ie
Thu Mar 29 23:37:10 IST 2007
On 29 Mar 2007, at 13:10, Jeroen Massar wrote:
> Niall O Broin wrote:
>> I use rsync a lot, and my normal call to rsync includes --symlinks .
> Hmmm, my rsync (2.6.9-3 on debian unstable) doesn't include that
> it seems.
Nor does mine :-) The sym was added in by the keyboard daemons -
that's my story and I'm sticking to it. I did of course actually use
--links ( I have that option in scripts I'm using for years - in such
scripts I tend to use the long options as an aid to documentation)
> I do tend to use ssh to copy my files over and will steer clear
> from any
> other server, more listening sockets and services to check for
> holes is not a good thing IMHO.
Yes, but OTOH if you want to do regular scripted backups with rsync,
the choice is ssh with keys with no passphrases, or rsync server. You
pays your money . . .
>> A careful reading of the man page doesn't show up any reason for this
>> behaviour, and googling finds lots of pages explaining the --symlinks
>> option etc. - thanks :-(.
> My rsync does have:
> -l, --links copy symlinks as symlinks
> -L, --copy-links transform symlink into referent file/dir
> --copy-unsafe-links only "unsafe" symlinks are transformed
> --safe-links ignore symlinks that point outside the
> -k, --copy-dirlinks transform symlink to dir into referent
> -K, --keep-dirlinks treat symlinked dir on receiver as dir
> And -a is:
> -a, --archive archive mode; same as -rlptgoD (no -H,
> Depends of course on what you want to accomplish, but I guess you are
> looking for -a in essence as that makes a full 1:1 copy into a remote
I don't have a problem with the options to rsync (my misspelling
notwithstanding). What was puzzling me about this situation (and I
thought I made that clear in the original mail) was what happened to
the symlinks copied to the rsync server - they lost their leading /
and this did NOT happen with rsync to another local disk, or to a
remote box over ssh. I wondering is this is a bug, or a not very well
More information about the ILUG