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. -- View this message in context: http://www.nabble.com/rsync-and-running-scripts-tp17765400p17765400.html Sent from the Samba - rsync mailing list archive at Nabble.com.
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.
On Tue, Jun 10, 2008 at 02:42:25PM -0700, becca23 wrote:> 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?See the "pre-xfer exec" and "post-xfer exec" daemon parameters (first added in 2.6.7): http://rsync.samba.org/ftp/rsync/rsyncd.conf.html ..wayne..
Maybe Matching Threads
- [Bug 8188] New: Mechanism for taking an rsync server down for maintenance
- chdir / chroot after pre-xfer ?
- Is it possible to use rsync daemon running on 64-bit machine from a 32-bit machine?
- Yet another rsync incremental thread
- pre/post-xfer exec not executed ?