post-xfer exec -- more juice!
mike at pienetworks.com
Fri Sep 8 04:42:16 GMT 2006
I'm attempting to use the pre-xfer exec and post-xfer exec utilities to
replace a complicated script which tails the rsync log and does A Bunch
Of Stuff at the beginning and completion of rsync transfers.
(It will also allow us to throw away a nasty hack which forces rsync to
log the fact that is exiting - trying to provide a catch for /all/
possible exit conditions (ie, strings in the log file) seemed
However, my efforts are hampered by not knowing the name of the
transferred file in the post-xfer script - the fine print says
"RSYNC_REQUEST: (pre-xfer only)"
This pair of config items is _almost_ perfect for managing all the
wonderful things which we need to have done to freshly arrived files.
As well, we have a situation where the state of the filesystem must be
guaranteed unchanging whilst an rsync is in process (sending data), so
we set a flag at the start of the transfer and remove it at the end.
pre-exec is perfect for doing this, and so would be post-exec -- _if_ we
knew which rsync had just completed!!
Am I missing some trivial way to give this information to a post-exec
Are there some logistical restrictions which would prevent me from
(easily) modifying the rsync source to send this information to the
More information about the rsync