rsync and running scripts

Michal Soltys soltys at ziu.info
Wed Jun 11 07:52:23 GMT 2008


becca23 wrote:
> I'm using the rsync protocol to keep a windows and linux system mirrored. I
> have set up the rsync and ssh to run properly, but I would like to know if
> there is an option, whether in the rsync command or placed in the
> rsyncd.conf file where I can call a script that runs each time rsync
> executes? The reason i need to do this is to change the groups/permissions
> of files when they are transferred over. I could just set this script to run
> every minute or so, but I would rather strive for accuracy by just having it
> run every time rsync completes a run through.

What about initiating the transfer on the receiving side ? This way - a 
script and a cron job (or some batch file and task scheduler, if it's on 
windows side) would do the thing nicely. Or if it must be sending side, 
just ssh remote command (script) to do any cleanup you might need after 
rsync transfer completes.


More information about the rsync mailing list