Yet another rsync incremental thread

Matt McCutchen matt at mattmccutchen.net
Mon Jul 28 14:24:16 GMT 2008


> Le 28 juil. 08 à 09:39, macuserfr a écrit :
> > Hi folks, that's me again...
> >
> > Well, following Matt's suggestion, I'm trying to setup my server to  
> > call a post transfer script. Guess what? It's not working and I  
> > don't know why. I've looked around other posts in this mail list and  
> > googling around. Didn't found what's wrong with my setup. So rsync  
> > runs nicely but don't call the post-transfer script. The post  
> > transfer script runs fine when I run it manually with root, rsync  
> > user or the module defined user (serveuranm). No errors in client  
> > side nor in rsyncd log. There is maybe a path/user mistake somewhere.

(This original message doesn't seem to have gone to the list.)

My guess is that the script is running but failing, and silently because
the rsync daemon redirects its stdout and stderr to /dev/null.  One of
the first things a pre-xfer or post-xfer script should do is redirect
its stdout and stderr to a log file somewhere that you can review in
case of problems.  In bash, the code for that is:

exec >>/PATH/TO/LOG 2>&1

(I don't know tcsh.)

And why the failure?  Your script seems to assume a particular working
directory, because it goes looking for "data" and "backup" in that
directory.  Note that it will inherit the working directory in which
"rsync --daemon" was run to start the daemon.  If that isn't what your
script wants, add an appropriate "cd" command.

Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/rsync/attachments/20080728/95b0dc6f/attachment.bin


More information about the rsync mailing list