As of version 2.6.7, rsync server can kick scripts before and after transfers. You can use the recipe below to implement this very handy functionality in cwrsync server:
- Install Copssh and Cwrsync Server.
- Start a windows command shell from cwrsync start menu and make a copy of bash.exe as sh.exe in the bin directory.
copy bin\bash.exe bin\sh.exe
- Create two script files in the bin directory for pre-exec operations:
# Shell script for your pre-exec operations
cmd /c "c:\program files\ICW\bin\pre-exec.cmd"
- Create two script files for post-exec operations as described above.
- Update your rsyncd.conf file:
# Module definitions
path = .....
pre-xfer exec = /bin/pre-exec.sh
post-xfer exec = /bin/post-exec.sh