--copy-unsafe-links unexpected behavior with unsafe symlinks

crstml at libero.it crstml at libero.it
Tue Jan 11 08:55:16 UTC 2022


> On Sun, Nov 28, 2021 at 12:53 PM Cristian via rsync <rsync at lists.samba.org>
> wrote:
>
>> $ rsync --copy-unsafe-links -avz --delete tree XXX
>>
> In this case, the "tree" directory is a part of the transfer inside the
> top-of-transfer dir (the current directory). Thus any symlinks that don't
> try to escape the current directory are considered to be OK.  You should
> instead suffix "tree" with a slash and add "tree" to your destination path:
>
> $ rsync --copy-unsafe-links -aivz --delete tree/ host:/old/path/tree/
>
> This is discussed in the man page
> <https://download.samba.org/pub/rsync/rsync.1> (search for "unsafe").

Hello Wayne

The first time when I read your answer above it when I saw "in the man page" I looked
in the manual page on my local computer but the explanations for the |--copy-unsafe-links|
option do not contain the section regarding the "cut-off point"

Now it happened to me to repoen this email and to check the link above and I
had the pleasant surprise to find the part about the "cut-off point" that explains
what is going on.

Thank you Wayne for your answer.

Cristian.

> ..wayne..




More information about the rsync mailing list