Support

Akeeba Backup for Joomla!

#8763 Cron job failing after working well for weeks

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 Monday, 10 January 2011 08:03 CST

user13570
Hello team,

Awesome product!

I'm running latest Joomla & Akeeba Backup 3.1.5 on Hostgator shared hosting. Have set up 2 cron jobs that worked fine for weeks: a dB hourly backup + dropbox and a twice a day full site backup no post processing. Made absolutely no changes to any Akeeba configs nor server files and starting yesterday AM, I now receive cron fail errors via email for the full site backup (the other hourly one works fine).

Note: running the backup from the backend is fine.

Config:
Full Site backup (some directories are omitted)
JPA format
No Post Processing
Enable size quota = 1004Mb

Here's the content of one of these emails:

******************
Akeeba Backup CLI 3.1.5 (2010-11-23)
Copyright (C) 2010 Nicholas K. Dionysopoulos
-------------------------------------------------------------------------------
Akeeba Backup is Free Software, distributed under the terms of the GNU General
Public License version 3 or, at your option, any later version.
This program comes with ABSOLUTELY NO WARRANTY as per sections 15 & 16 of the
license. See http://www.gnu.org/licenses/gpl-3.0.html for details.
-------------------------------------------------------------------------------

Starting a new backup with the following parameters:
Profile ID 1
Description "Command-line backup"

Current memory usage: 105.1 Kb

Last Tick : 2011-01-07 01:00:10 GMT-0600 (CST)
Domain : init
Step :
Substep :
Memory used : 1.59 Mb

Last Tick : 2011-01-07 01:00:20 GMT-0600 (CST)
Domain : PackDB
Step : jos_redirection
Substep : 616 / 1538
Memory used : 2.88 Mb

Last Tick : 2011-01-07 01:00:22 GMT-0600 (CST)
Domain : PackDB
Step :
Substep :
Memory used : 2.68 Mb

Last Tick : 2011-01-07 01:00:24 GMT-0600 (CST)
Domain : finale
Step :
Substep :
Memory used : 2.78 Mb

Last Tick : 2011-01-07 01:00:26 GMT-0600 (CST)
Domain : finale
Step :
Substep :
Memory used : 2.84 Mb

Last Tick : 2011-01-07 01:00:32 GMT-0600 (CST)
Domain : finale
Step : Post-processing
Substep : dB-www.frenchtoday.com-20110107-070009.sql
Memory used : 2.84 Mb

Fatal error: Class 'JFactory' not found in /home/[removedXXXXX]/public_html/administrator/components/com_akeeba/akeeba/platform/joomla15/platform.php on line 822

**************

The backup shows as Failed in the Administer window, the other dB Cron job works fine.

Thanks for your help!

--Olivier

dlb
Oliver,

Which job is failing? You said it was the full site backup, but the step just before the error looks like it was doing a database backup. Also, the job failed in the post processing phase. Does the failed backup produce a backup log? If so, please zip and post it.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

nicholas
Akeeba Staff
Manager
It looks as if the backup.php file is damaged and doesn't set a necessary define during its initialization. Can you reinstall the component please?

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!

user13570
So I had 2 failures at the same time and I got a little confused. The cron that is reporting errors is actually the SQL + dropbox one not the full backup one.

I tried disabling the dropbox part of the profile and it still reported the same error. I then reinstalled 3.1.5 based on Nikos' request and it's still sending me these errors.

Weird thing is, I can see the backups in the Administer list and actually they are fine. So besides these error messages, it seems like everything else is working.

(Log file attached but does not seem to show any errors either). Weird.

Latest error email:
Akeeba Backup CLI 3.1.5 (2010-11-23)
Copyright (C) 2010 Nicholas K. Dionysopoulos
-------------------------------------------------------------------------------
Akeeba Backup is Free Software, distributed under the terms of the GNU General
Public License version 3 or, at your option, any later version.
This program comes with ABSOLUTELY NO WARRANTY as per sections 15 & 16 of the
license. See http://www.gnu.org/licenses/gpl-3.0.html for details.
-------------------------------------------------------------------------------

Starting a new backup with the following parameters:
Profile ID  1
Description "Command-line backup"

Current memory usage: 105.1 Kb

Last Tick   : 2011-01-07 11:00:10 GMT-0600 (CST)
Domain      : init
Step        :
Substep     :
Memory used : 1.59 Mb

Last Tick   : 2011-01-07 11:00:21 GMT-0600 (CST)
Domain      : PackDB
Step        :
Substep     :
Memory used : 2.81 Mb

Last Tick   : 2011-01-07 11:00:31 GMT-0600 (CST)
Domain      : PackDB
Step        : jos_rokcandy
Substep     :
Memory used : 2.8 Mb

Last Tick   : 2011-01-07 11:00:37 GMT-0600 (CST)
Domain      : PackDB
Step        :
Substep     :
Memory used : 2.68 Mb

Last Tick   : 2011-01-07 11:00:39 GMT-0600 (CST)
Domain      : finale
Step        :
Substep     :
Memory used : 2.78 Mb

Last Tick   : 2011-01-07 11:00:54 GMT-0600 (CST)
- Hide quoted text -
Domain      : finale
Step        : Post-processing
Substep     :
Memory used : 2.84 Mb


Fatal error: Class 'JFactory' not found in /home/olivierk/public_html/administrator/components/com_akeeba/akeeba/platform/joomla15/platform.php on line 822


--Olivier

nicholas
Akeeba Staff
Manager
OK, now I know what happens. You have enabled the option to send an email to Super Administrators upon backup completion, however that feature doesn't work properly in the command line CRON scrip (backup.php) mode.

The temporary way to mitigate the problem is to go to your Akeeba Backup Control Panel, click on the Parameters button in the toolbar and set "Email on backup completion" to No. In fact, you don't need this option as your host automatically emails you the output of the CRON script as you have seen. In other words, the email you get and are pasting here doesn't come from Akeeba Backup, but from your host.

On my end, I will fix the code so that option works even in command line backup mode, but this will happen in version 3.2.

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!

user13570
Hi Nikos,

You were right, for some reason, the send email upon completion was on
BUT:
none of the fields were filled in and never received a single email (successful or not) from Akeeba before I started receiving these error ones 48 hours ago :-)

So I went ahead and turned that checkbox off and now I am still receiving emails every hour (except these don't show any errors at the bottom). I'll check on the Hostgator side to see if they changed some options upon Cron completion.

Akeeba Backup CLI 3.1.5 (2010-11-23)
Copyright (C) 2010 Nicholas K. Dionysopoulos
-------------------------------------------------------------------------------
Akeeba Backup is Free Software, distributed under the terms of the GNU General
Public License version 3 or, at your option, any later version.
This program comes with ABSOLUTELY NO WARRANTY as per sections 15 & 16 of the
license. See http://www.gnu.org/licenses/gpl-3.0.html for details.
-------------------------------------------------------------------------------

Starting a new backup with the following parameters:
Profile ID  1
Description "Command-line backup"

Current memory usage: 105.1 Kb

Last Tick   : 2011-01-08 04:00:10 GMT-0600 (CST)
Domain      : init
Step        :
Substep     :
Memory used : 1.59 Mb

Last Tick   : 2011-01-08 04:00:19 GMT-0600 (CST)
Domain      : PackDB
Step        : jos_vm_shopper_vendor_xref
Substep     : 4 / 99
Memory used : 2.88 Mb

Last Tick   : 2011-01-08 04:00:21 GMT-0600 (CST)
Domain      : PackDB
Step        :
Substep     :
Memory used : 2.69 Mb

Last Tick   : 2011-01-08 04:00:23 GMT-0600 (CST)
Domain      : finale
Step        :
Substep     :
Memory used : 2.78 Mb

Last Tick   : 2011-01-08 04:00:41 GMT-0600 (CST)
Domain      : finale
Step        : Post-processing
Substep     :
Memory used : 2.84 Mb

Last Tick   : 2011-01-08 04:00:43 GMT-0600 (CST)
Domain      : finale
Step        : Post-processing
Substep     :
Memory used : 2.84 Mb

Last Tick   : 2011-01-08 04:00:45 GMT-0600 (CST)
Domain      : finale
Step        : Post-processing
Substep     :
Memory used : 2.84 Mb

Last Tick   : 2011-01-08 04:00:47 GMT-0600 (CST)
Domain      : finale
Step        : Post-processing
Substep     :
Memory used : 2.84 Mb

Backup job finished successfully after approximately 43 seconds
- Hide quoted text -
Peak memory usage: 3.55 Mb

nicholas
Akeeba Staff
Manager
Even if none of those fields are filled in, Akeeba Backup starts making some assumptions. It assumes that you want the default email body with the default email subject to be sent out to all Super Administrators of your site. The problem was on that last assumption. When it tried fetching a list of Super Administrators it did so in a way not compatible with the command-line CRON mode used by backup.php, causing a crash. At that time, the backup was complete (hence marked as "OK" in the Administer Backup Files page) but the post-processing had never run, so you didn't see the files in DropBox. By turning that option off you told Akeeba Backup to skip sending an email upon backup completion, working around the bug :)

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!

user13570
Thanks for the quick reply Nikos!

That's a perfectly understandable default behavior (although the backups did make it onto dropbox before I started seeing those error emails). As long as my backup work, I won't complain :-)

My big question is now: why do I keep receiving completion emails even when the "Email on backup completion" is checked off?

--Olivier

nicholas
Akeeba Staff
Manager
As I said two posts above, these emails are sent from your host, not Akeeba Backup. The CRON script (backup.php) is dumping its output to the "standard output". The CRON daemon running on your server fetches that output and sends it by email back to you when backup.php stops running. If you want to no longer receive emails just append > /dev/null to your CRON command line. This instructs the operating system to redirect the output from backup.php to /dev/null (affectionately called the "Black Hole" or the "bit bucket" by system administrators). Since no output makes it out of the Black Hole, the CRON daemon has nothing to report to you and refrains from sending out an email.

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!

user13570
Weird behavior: 2 Cron jobs, 2 profiles and only 1 ever sends back any emails (errors or success).

Just saw that Hostgator updated their servers to cPanel 11.28 around the same timeframe that the one cron job started acting. It might be related. I'll go ahead and add that /dev/null to the cron job and let you enjoy your weekend :-)

Thanks for the help!

UPDATE: The only differences between the 2 cron jobs was that the one that never emailed had these arguments: "-profile=2 -description="Daily full backup" and the one that emailed had no arguments at all.


--Olivier

user13570
Update:

Matching the arguments of the non-emailing Cron job onto the problematic one did not change anything...

So appended the > /dev/null and now everything is running smoothly.

Thanks.

--Olivier

nicholas
Akeeba Staff
Manager
You're welcome!

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!