New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Backup mail subject always show (failed)

Got problems with your B2 or B3? Share and get helped!
Post Reply
effevee
Posts: 9
Joined: 26 Jun 2009, 14:14
Location: Ingelmunster, Belgium

Backup mail subject always show (failed)

Post 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
albert
Posts: 69
Joined: 09 Jul 2007, 14:35
Location: The Netherlands

Re: Backup mail subject always show (failed)

Post 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
nobody
Posts: 226
Joined: 10 Mar 2012, 14:46

Re: Backup mail subject always show (failed)

Post by nobody »

If you wrap the cron script in another script (that just calls that backup script), then the nonzero exit is ignored
effevee
Posts: 9
Joined: 26 Jun 2009, 14:14
Location: Ingelmunster, Belgium

Re: Backup mail subject always show (failed)

Post 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
johannes
Posts: 1470
Joined: 31 Dec 2006, 07:12
Location: Sweden
Contact:

Re: Backup mail subject always show (failed)

Post by johannes »

Yes, bug reported, we're on it. Thanks for reporting!
/Johannes (Excito co-founder a long time ago, but now I'm just Johannes)
Post Reply