Page 1 of 1

Backup mail subject always show (failed)

Posted: 23 Jun 2012, 08:39
by effevee
Hi all,

I've had some trouble with my B2 backups lately due to a malfunctioning NAS. This has been fixed and the B2 backups are ok now, but the subject of the backup mail notifications keeps showing (failed) at the end.

Any idea how this can be fixed ?

TIA,

Effevee

Re: Backup mail subject always show (failed)

Posted: 23 Jun 2012, 12:26
by albert
This is a problem I already communicated to Excito.

The problem is that the backup script, run by cron at a certain time, always returns a non-zero value. The cron daemon sees a return value of non-zero as a failed job. This cron daemon also mails the output of the job to the user, and because it failed (so it thinks) it adds (failed) to the end of the subject line. The solution would be for the backup script to return 0 when the backup went fine and non-zero when it fails.

For the moment there is no fix, hopefully that will be done in future releases. The only way to check if the backup is fine is to check the message itself, where it will tell you if it went ok.

Albert

Re: Backup mail subject always show (failed)

Posted: 23 Jun 2012, 16:58
by nobody
If you wrap the cron script in another script (that just calls that backup script), then the nonzero exit is ignored

Re: Backup mail subject always show (failed)

Posted: 24 Jun 2012, 01:57
by effevee
albert wrote:This is a problem I already communicated to Excito.

The problem is that the backup script, run by cron at a certain time, always returns a non-zero value. The cron daemon sees a return value of non-zero as a failed job. This cron daemon also mails the output of the job to the user, and because it failed (so it thinks) it adds (failed) to the end of the subject line. The solution would be for the backup script to return 0 when the backup went fine and non-zero when it fails.

For the moment there is no fix, hopefully that will be done in future releases. The only way to check if the backup is fine is to check the message itself, where it will tell you if it went ok.

Albert
Thanks Albert,

Guess the new backup script needs some more tweaking Excito :wink:

Effevee

Re: Backup mail subject always show (failed)

Posted: 25 Jun 2012, 12:26
by johannes
Yes, bug reported, we're on it. Thanks for reporting!