Looking for a Comprehensive list of error codes

Matt McCutchen matt at mattmccutchen.net
Wed Nov 19 04:25:47 GMT 2008


> 2008/11/19 John Macon <johnmacon-dallas at hotmail.com>:
> > Good Afternoon,
> >
> > I have been looking for a comprehensive list of error codes that are
> > returned by rsync for a script that I am writing.  I have searched Ggoogle
> > and Yahoo! and I have found out the following:
> >
> > 4 = action not supported
> > 5 = wrong password
> > 10 = socket IO error
> > 11 = file IO error
> > 12 = broken connection
> > 23 = file(s) couldn't be transferred
> > 255 = unspecified error
> >
> > Is there anywhere that I can find other error codes for rsync?

On Wed, 2008-11-19 at 12:31 +1300, David Overton wrote:
> You could look at the EXIT CODES section of the rsync(1) man page,
> e.g. at http://www.samba.org/ftp/rsync/rsync.html.

The list in the man page is slightly out of date.  The source code may
be a better source:

http://gitweb.samba.org/?p=rsync.git;a=blob;f=log.c#l72

The mapping to numbers is found in:

http://gitweb.samba.org/?p=rsync.git;a=blob;f=errcode.h

(The line number in the first link may rot.)

> > I am writing a script that will upload/sync all files/folders from a
> > particular domain to a CDN with a click of a button.  I need to build as
> > much intelligence into the script as possible and I am hoping to be able to
> > translate all error codes to an end-user readable format so that the
> > end-user can provide ample information if/when something goes wrong (at
> > least more than "It doesn't work").

If the goal is to provide ample information to a support person
knowledgeable about rsync, the end user should just provide rsync's
complete stderr output; I don't see the benefit of any translation.
What may make sense is to list some common causes for each exit code so
the user can fix the problem him/herself if it's something obvious.

Matt



More information about the rsync mailing list