trigger for pre and post rsync

Christoph Biedl cbiedl at gmx.de
Fri Jun 10 20:27:26 GMT 2005


Wayne Davison wrote...

> On Thu, May 12, 2005 at 03:10:49PM -0300, C. P. wrote:
> > I think it may be useful to add an option like lograte's prerotate and
> > postrotate, that triggers server side scripts before and after rsync.
> > It would help the administrator work.
> 
> I don't think I want to complicate rsync with this functionality.  Yes,
> it would be convienent for those cases where something like this is
> needed, but they are rare enough that I think having the user use some
> other means of performing the pre-/post-transfer actions is a better way
> to go (for the main distribution, at least -- it wouldn't be hard to
> patch in this functionality if you wanted to customize rsync).

When setting up an rsync server I found myself in a situation when a
preexec/postexec parameter would have been a nice-to-have - path was
actually a mount point where an image file had to be mounted loopback.
However after some digging in the sources I decided that especially
postexec would not be that easy to catch. Furthermore huge efforts would
have been necessary to avoid some ugly race situations of the "should
never happen" kind which do actually happen as Murphy teaches us.

I finally managed to work around the whole thing.

    Christoph


More information about the rsync mailing list