mail rsync logs

Ed lists at precognet.com
Fri Nov 17 23:26:27 GMT 2006


Hi all,
I have a rsync daemon and I'd like my users to get a mail with the content of 
the log so they can see what was backed up or if something failed.

I separated the logs per user via the syslog and I use "post-xfer exec" to 
execute a script that will search for the last PIDs for rsync like so:

id1=`ps -ef | grep "rsync --daemon" | tail -n 1 | awk '{print $2}'`
id2=`expr $id1 \+ 1`

from there, my script does the rest, but if I have more than one client, it's 
doomed to fail.

There must be a simpler way to do that than what I am doing now.  Did I miss a 
chapter in the man pages?

Any feedback is appreciated. Thanks
 -Ed


More information about the rsync mailing list