[Bug 12819] [PATCH] sync() on receiving side for data consistency

Ben RUBSON ben.rubson at gmail.com
Fri Jun 16 10:34:40 UTC 2017

> On 15 Jun 2017, at 19:29, Karl O. Pinc via rsync <rsync at lists.samba.org> wrote:
> On Thu, 15 Jun 2017 13:23:44 +0000
> just subscribed for rsync-qa from bugzilla via rsync
> <rsync at lists.samba.org> wrote:
>> https://bugzilla.samba.org/show_bug.cgi?id=12819
>> --- Comment #7 from Ben RUBSON <ben.rubson at gmail.com> ---
>> Note that my patch simply adds a sync() just after recv_files(), so
>> one sync() per connection, not per write operation.
>> But we could make this a rsync option, so that one can enable /
>> disable it on its own.
> I think the "right" rsync option to add (because rsync does
> not have enough options already ;-) is a --hook-post option.
> It would run something (a `sync` in your case) on the
> remote end after finishing.  There are clear security issues
> here.
> Rather than having --hook-post and having to do something
> (a server side config option that says what --hook-post
> can do?) to address the security concerns it seems much
> simpler to improve the rsync documentation regarding running
> the rsync server side.

--daemon (if used) already has post-xfer option, but as explained in
the bug report, could be hard to use when daemon is chrooted.

> I'm still using command="rsync --server --daemon ." in my
> ~/.ssh/authorized_keys file on the remote end.  It'd be simple 
> enough to add, say, a "sync" to the end of this to force a sync
> when rsync finishes.

It would however sync() even if the client only read files.

> The problem is that the --server (and, especially,
> --daemon) documentation has gone away.  Or at least
> left the man page. (v3.1.1, Debian 8, Jessie)  Except
> for a hint that --server exists at the bottom.

Are you looking for `man rsyncd.conf` ?

> If the server side of rsync was better documented then
> perhaps a simple inetd rsync service (or --rsync-path
> or -e value, etc.) would be easy for the end-user to 
> cobble together to meet needs such as this.
> Can somebody please explain --server?  (And --sender, I guess.)
> I might (possibly) be motivated to send in a man page patch.
> Regards,
> Karl <kop at meme.com>

Thank you for your feedback Karl !


More information about the rsync mailing list