How can I make pre-exec and post-exec work ?
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:
c:\program files\ICW\bin\pre-exec.sh
# Shell script for your pre-exec operations
cmd /c "c:\program files\ICW\bin\pre-exec.cmd"
exit 0
c:\program files\ICW\bin\pre-exec.cmd
@ECHO OFF
..... - 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
Release announcements
- 2024-03-13 Copssh client 7.14.1
- 2024-03-13 cwRsync client 6.2.12
- 2024-03-11 Copssh server 8.5.0
- 2024-03-11 Copssh server 7.17.0
- 2024-03-11 Copssh client 7.14.0