rsync over ssh with post-zfer

Ben Short ben at benshort.co.uk
Fri Sep 9 04:56:56 MDT 2011


Hi,

I have install rsync version 3.0.8 on my FreeBSD server.

I've set it up so that I have to connect via ssh with key based
authentication.

The following is my rsyncd.conf file in my home directory on the server.

[ben-desktop]
use chroot = no
path = /home/bs/backups/ben-desktop/current
numeric ids = true
log file = /home/bs/backups/ben-desktop/rsync.log
list = true
read only = false
write only = false
post-xfer exec = /home/bs/post-xfer $RSYNC_MODULE_PATH

The file post-xfer file contains the following.

#!/bin/sh

env >> /var/log/prexfer_test.log
exit 0

I've added the following to the sudoers file so that the rsync daemon runs
as root and can preserve the file permissions.

bs ALL= NOPASSWD:/usr/local/bin/rsync

I use the following command from my client...

rsync -avz --rsync-path="sudo rsync" -e ssh rsync_test bs at 192.168.6.6:
:ben-desktop

When I run the command from my client it copies the files, keeping the
permissions, but it seems that the post-xfer command is not executed.

Should it work with my configuration?

Thanks

Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20110909/91dfcf95/attachment.html>


More information about the rsync mailing list