[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rsync
Subject:    Re: Skip source files that differ from existing destination files with a warning?
From:       Wayne Davison via rsync <rsync () lists ! samba ! org>
Date:       2020-09-23 16:39:39
Message-ID: CAHSx_Ss0hzYBS93JVQkhvH7feJ4BVag4hiGSBzFG9ye_oaaWqA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Thu, Sep 17, 2020 at 5:32 AM Matt McCutchen wrote:

> For the "not transfer" part, I can use --ignore-existing, but I don't see
> a direct way to be warned only about source files that differ from
> existing destination files.
>

Indeed, the 2-step approach that you mentioned is all that the released
rsync supports.  I've just checked-in a change that adds the `--info=skip2`
option that will add a suffix to the "exists" message that indicates the
existence-skipped file's status: "type change", or "sum change" (requires
`-c`), "file change" (based on quick check), "attr change", or "uptodate".

My reading of the code also suggests that if the sender is
> malicious, --ignore-existing will not stop the receiver from processing a
> transfer of an existing destination file initiated by the sender


Undoubtedly true, since the only thing the option does is limit what files
the generator will request. At some point it will be good to double-check
that the receiver doesn't get a file that the generator didn't request, but
the current nature of the round-robin pipe through the sender makes that
difficult without some new kind of direct generator-to-receiver flow of
information.  I have an idea of how I'd like to improve rsync's
receiver-side process setup in the future, but it's not easy to tweak in
the current version.

..wayne..

[Attachment #5 (text/html)]

<div dir="ltr"><div dir="ltr"><span class="gmail-im" style="color:rgb(80,0,80)"><div \
dir="ltr">On Thu, Sep 17, 2020 at 5:32 AM Matt McCutchen  wrote:<br></div></span><div \
class="gmail_quote"><span class="gmail-im" style="color:rgb(80,0,80)"><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">For the &quot;not transfer&quot; part, I can use \
--ignore-existing, but I don&#39;t see a direct way to be warned only about source \
files that differ from<br>existing destination \
files.<br></blockquote><div><br></div></span><div>Indeed, the 2-step approach that \
you mentioned is all that the released  <span class="gmail-il">rsync</span>  \
supports.   I&#39;ve just checked-in a change that adds the `--info=skip2` option \
that will add a suffix to the &quot;exists&quot; message that indicates the \
existence-skipped file&#39;s status: &quot;type change&quot;, or &quot;sum \
change&quot;  (requires `-c`), &quot;file change&quot; (based on quick check), \
&quot;attr change&quot;, or &quot;uptodate&quot;.</div><span class="gmail-im" \
style="color:rgb(80,0,80)"><div><br></div><blockquote class="gmail_quote" \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">My reading of the code also suggests that if the \
sender is malicious,  --ignore-existing will not stop the receiver from processing a \
transfer of an existing destination file initiated by the \
sender</blockquote><div><br></div></span><div>Undoubtedly true, since the only thing \
the option does is limit what files the generator will request.  At some point it \
will be good to double-check that the receiver doesn&#39;t get a file that the \
generator didn&#39;t request, but the current nature of the round-robin pipe through \
the sender makes that difficult without some new kind of direct generator-to-receiver \
flow of information.   I have an idea of how I&#39;d like to improve  <span \
class="gmail-il">rsync</span>&#39;s receiver-side process setup in the future, but \
it&#39;s not easy to tweak in the current version.  </div><font color="#888888"><div> \
</div><div>..wayne..  </div></font></div></div></div>



-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic