Feature request for rsync for running scripts

Evan Harris eharris at puremagic.com
Tue Jul 19 19:10:18 GMT 2005

I was wondering if others might find it useful to have a parameter in the
rsync daemon config that would allow running a command on the server at
session start or at successful rsync completion.

For instance, this would allow a webpage to be automatically maintained (by
a script called by this method) with the timestamps of the last successful
rsync completion (no errors, all files transferred), which would be very
nice for keeping track of the state of mirrors.

I looked in the patches directory, and see there is already a
pre-post-exec.diff patch to allow for running scripts before and after the
chroot, but I'm more interested in running after successful rsync completion
than after the chroot.

The already present patch also doesn't allow for some method of passing
other useful information like the username of an authenticated user, or the
ipaddress of the rsync client, either of which might be useful in tracking
which mirrors were up to date.  Other info like the module name or even the
number/size of files transferred would also be useful.

This would also be very nice for doing things like queuing a backup job for
the module that was rsynced in the case of dirs pushed to the server for
the purposes of backups.  Maybe also a way to bypass the script if no files
were transferred, but the rsync was otherwise error-free.

Comments appreciated.


More information about the rsync mailing list