exit status

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

exit status

Jacques Botha
Hi all

I am looking for a list of exit status codes for rdiff-backup

i.e: I do not want to alert when a non-critical error occurred. Say a
file changed while backing up, rdiff-backup make an alert, but
ultimately the backup was successful, I don't want to alert.

If the backup fails because the remote machine ran out of disk space, or
if it could not connect to remote machine in the first place, or
something critical that prevents the backup from completing, I want to
alert.

The 0 or 1 exit status as described in the man page does not quite cater
for this.

Any help would be appreciated.

--
Jacques Botha
South Africa
+27-11-889-4142

Slashdot Fortune of the Day: Look, this is Debian. They don’t release
things until you have to fire rockets at the thing to stop it working !

_______________________________________________
rdiff-backup-users mailing list at [hidden email]
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: exit status

Ben Escoto
>>>>> Jacques Botha <[hidden email]>

>>>>> wrote the following on Fri, 30 Dec 2005 11:19:38 +0200
>
> I am looking for a list of exit status codes for rdiff-backup
>
> i.e: I do not want to alert when a non-critical error occurred. Say a
> file changed while backing up, rdiff-backup make an alert, but
> ultimately the backup was successful, I don't want to alert.
>
> If the backup fails because the remote machine ran out of disk space, or
> if it could not connect to remote machine in the first place, or
> something critical that prevents the backup from completing, I want to
> alert.
>
> The 0 or 1 exit status as described in the man page does not quite cater
> for this.
Checking zero/non-zero is probably what you want.  If there are
ListErrors or UpdateErrors, the exit code will still be 0 as long as
rdiff-backup finishes normally.  I updated the man page to make this
clearer:

        If rdiff-backup finishes successfully, the exit status will be 0.
        If there is an unrecoverable (critical) error, it will be non-zero
        (usually 1, but don't depend on this specific value).


--
Ben Escoto

_______________________________________________
rdiff-backup-users mailing list at [hidden email]
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: exit status

Dave Kempe
In reply to this post by Jacques Botha
Jacques Botha wrote:

> Hi all
>
> I am looking for a list of exit status codes for rdiff-backup
>
> i.e: I do not want to alert when a non-critical error occurred. Say a
> file changed while backing up, rdiff-backup make an alert, but
> ultimately the backup was successful, I don't want to alert.
>
> If the backup fails because the remote machine ran out of disk space, or
> if it could not connect to remote machine in the first place, or
> something critical that prevents the backup from completing, I want to
> alert.
>
> The 0 or 1 exit status as described in the man page does not quite cater
> for this.

The rdiff-backup nagios plugin does some of the checking you might want.
You don't need nagios to make it useful - it runs fine from the command
line and provides exit statuses in line with the nagios plugin
specification. IE, 0 for successful, 1 for warning, 2 for critical and 3
for unknown. It checks the repository itself, so you would run it on the
destination machine out of cron or something. Of course setting up
nagios is not that difficult and probably has other benefits (ie it
could monitor disk space at the very least).
If it doesn't do exactly what you are after, patches are warmly accepted :)

Nagios plugin here:
http://tinyurl.com/b2877

thanks

dave


_______________________________________________
rdiff-backup-users mailing list at [hidden email]
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki