Support

Akeeba Backup for Joomla!

#13476 Failed backup email

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by nicholas on Saturday, 08 September 2012 06:42 CDT

zebrafilm
Loving the Remote CLI option but I do miss an email on failure.
Currently AKbackup only send an email on succes, can that be given an option to send the error /failed backup notice?
Jmonitoring is already a step but I need to go to the site for this, so an automated email would be great.

Thanks Bastiaan

nicholas
Akeeba Staff
Manager
Hello Bastiaan,

A failed backup means that the backup script crashed. The PHP script is dead. Dead can't talk (or send emails). Put another way: Asking Akeeba Backup to email you when it fails is like asking a soldier to radio back if he dies during his mission. Obviously the dead soldier can't radio back the fact that he's dead trying to accomplish its mission. Likewise, Akeeba Backup can't email you the fact that it died trying to backup your site. Your soldier is dead and can no longer communicate. That's the only reason I have not implemented this feature.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

zebrafilm
Hi Nicholas,

Ok I am with you when a script crashes but I had a failed postprocessing error (Rackspace API number wrong) and did not get any mail. Failed post processing should be possible to mail?

nicholas
Akeeba Staff
Manager
As far as I understand the extremely sketchy PHP documentation on error handlers, when a fatal error occurs you have a very limited amount of time (I suppose a few dozens msec) to do clean up, like closing connections and stuff. I'm actually using this to log timeout failures. That said, it seems to not be called in the case of a Fatal error and it seems to be unable to load new files and/or create new resources which is what would be required to send an email.

Regarding your question, when a CLI script fails (note: applies only to CLI scripts running under the PHP CLI binary!) PHP returns exit status 1. Remote CLI also outputs a non-zero exit code when something fails. Here's a catch, though. If you are using the PHP CGI –instead of the PHP CLI– binary I think that the exit code is not set and there's no way to catch the error condition automatically. Also, I don't see anything in CRON's documentation which suggests that it can send emails when a CRON job fails. It can log failures to syslog, but that's about it. So I'm not sure how that feature you mention in RackSpace would work?

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

zebrafilm
No am not talking about a failed CLI script, I am talking about error messages generate from outside events, like a failed post upload.
In that case your script runs normal, Abackup ends normal. I get this status also correctly in Remote CLI.
With my limited knowledge it must be possible to send those messages in the email body of the 'succes' email?
Basically Abackup finished normal except it encountered an error in the post handeling.

nicholas
Akeeba Staff
Manager
Ah, now I understand what you're talking about. These are warnings, not errors. There is a reason why these can't be sent out with the email. In order to prevent a memory outage we trash the warnings cache as soon as we proceed to the next backup step. By the time the email is sent, there is no record of those warnings any more.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

zebrafilm
Alright, makes sense. Prefer a stable product above warning messages.
Thanks for explaining!

Bastiaan

nicholas
Akeeba Staff
Manager
You're welcome, Bastiaan!

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!