Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Find symlinks, or what should be symlinks...




On Apr 22, 2014 9:12 PM, "Darren Cook" <darren@example.com> wrote:
>
> Thanks Kalin, Jens, Travis, for the replies.
>
> > `rsync -HavPS --delete FROM:dewdwe/ TO:/dwedwe/`
>
> I tried this (experimenting with just one sub-directory tree), and it
> didn't work - it copied over all files again, but also left behind the
> original file, rather than creating a symlink (even though it said it
> was copying a symlink on the source side!)
>
> I then decided to just do the copy again, fresh, using this:
>   rsync -avz --safe-links  SRC DEST
>
> Well, I just learnt something very important about rsync, as some
> symlinks within the directory tree got copied, some didn't (*). Poking
> around, the ones that worked were relative (../../path/to/elsewhere),
> while the ones that didn't get copied used an absolute path in the
> symlink (/home/darren/path/to/elsewhere).
>
> (For the above-mentioned test I was using a directory that used absolute
> paths, so it might have done the Right Thing with relative paths.)
>
yes that is expected. You should either rsync the whole tree, or dereference the links (what happened on your first attempt). There is no easy way to mix both approaches probably.

Kalin.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links