Error handling with rsync

jw schultz jw at pegasys.ws
Thu Apr 18 19:44:01 EST 2002


On Thu, Apr 18, 2002 at 07:23:38PM -0700, Martin Pool wrote:
> On 18 Apr 2002, Otto Wyss <otto.wyss at bluewin.ch> wrote:
> > Since I uses rsync in a perl script I'd rather prefer to get error codes from
> > rsync instead of messages at STDOUT. Is there an option which tells rsync it
> > should return error codes?
> 
> You ought to get an exit code which indicates what happened overall;
> see the manual or errcode.h for the possible values.  Of course you 
> only get one error code for the whole operation.
> 
> I'd like to add an option which makes rsync produce machine-parseable
> output on stdout, so that programs can interpret it as they wish.
> At the moment it's likely to be SMTP-like in format (but of course
> unidirectional from rsync out):
> 
> e.g.
> 
> RSYNC 2.5.6
> START-CONNECT TCP jonquille.ozlabs.hp.com 8733
> COMPLETE-CONNECT
> SELECT-MODULE images
> START-READ-FILELIST
> COMPLETE-READ-FILELIST 388 files 1237918237 bytes
> START-RECIEVE-FILE install_2.4.5_beta.tgz O
> FILE-SIZE  23223983 bytes
> FILE-MTIME 91823923832 unix
> PROGRESS 100000
> PROGRESS 200000
> 
> etc
> 
> Comments welcome.

That would be fine.  For error checking a more regimented STDERR would be more
useful for me as that is what i parse for errors.


-- 
________________________________________________________________
	J.W. Schultz            Pegasystems Technologies
	email address:		jw at pegasys.ws

		Remember Cernan and Schmitt




More information about the rsync mailing list