(when) does rsync daemon sync ?

nvbolhuis at aimvalley.nl nvbolhuis at aimvalley.nl
Sun Nov 7 03:50:00 MST 2010


> On Tue, Nov 2, 2010 at 9:29 AM, Norbert van Bolhuis
> <nvbolhuis at aimvalley.nl>wrote:
>
>> Is there a way to make the rsync daemon use sync or whatsoever to make
>> sure
>> the rsync command returns only if all transferred data is written to
>> physical media[?]
>>
>
> You can't delay the return, but you can ask the rsync daemon to run "sync"
> by using a "post-xfer exec" command.  If you want that to run only for
> received files (i.e. if the module could be alternately used for sending
> files too), you'll need to also specify a pre-xfer exec command that
> analyzes the RSYNC_REQUEST variable, note the RSYNC_PID of any request
> that
> is for an incoming transfer, and make your post-xfer exec check if its
> RSYNC_PID indicates that it is a writing transfer.  Alternately, you could
> make one module write-only and a duplicate module read-only and only put
> the
> post-xfer sync onto the write-only module.
>
> ..wayne..
>


thx for your answer.
defining a "post-xfer exec" command is a good idea.

Btw. actually our biggest problem was a certain application
reading old data (after having sent the new data with rsync).
This was caused by the application itself (it didn't re-open
the file). At first I though this had something to do with
rsync/sync, but this isn't the case (apart from rsync
making the problem more visible because of the internal/final
move).

---
N. van Bolhuis





More information about the rsync mailing list