rsync over ssh - reporting errors

Steve Mallett spaceman at
Thu Nov 21 19:40:00 EST 2002

I have rsync using ssh to grab files off my local box, but would like 
to include some basic error reporting.

If the directory I'm trying to access no longer exists (or other 
reasons why the rsync would fail) I'd like to be notified vs. checking 

So, for instance:

rsync -azurv -e ssh spaceman at  .  #I 
changed docs to Docs for example
if [ $? -eq 1]
then mail -s "backup failed" spaceman

The process fails, but just hangs and doesn't exit to mail the error 
Any suggestions?

Steve Mallett

More information about the rsync mailing list