Support

Akeeba Backup for Joomla!

#8723 Command line backup failing

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 Friday, 03 December 2010 21:15 CST

breathwork
My cron initiated command line backup fails.

Can you##text## help me?

steph.s
Some hosts have time limits and file size limits. First, find the archiver engine option and click on the Configure button on its right. A new pane opens. Set the "part size for split archives" to 2 Mb. You can click on the slider and use your arrow keys to modify the setting.

In the fine tuning section, towards the bottom of the page:
- Minimum execution time: 1s
- Maximum execution time: 7s
- Bias: 65%

If that doesn't work for you, you should also check that you have enough space on you server for the backup files; we recommend you have at least 45-50% of your disk space free to make a backup.

breathwork
I have set the parameters as you have suggested and will update the thread tomorrow after the cron has fired.

nicholas
Akeeba Staff
Manager
I can also see a timeout error. This is usually caused by accidentally using the wrong kind of PHP binary, which seems to be the case in your site:
INFO |101129 00:00:08|PHP Interface :cgi-fcgi

You are using the PHP CGI binary which is designed to serve web pages, not run command-line PHP scripts (like Akeeba Backup's backup.php). It has a preconfigured time limit of 30 seconds, which makes the script time out. As per the documentation, you have to use the path to the PHP CLI (CLI = Command Lie Interface) binary in your CRON job's command-line. If you are unsure about this path, ask your host. If they reply with the same path you're using, escalate your support request until you get to talk with a support technician who can actually spell PHP and who can help you with that.

If that doesn't work with your host, please edit the backup.php file and place the following line right after the

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!

breathwork
Where is the file located as I can see several backup.php files on the site?
I have edited /administrator/components/com_akeeba/backup.php

nicholas
Akeeba Staff
Manager
I forgot to mention it, I apologize. The one you edited is indeed the correct one.

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!

breathwork
Will post the result tomorrow...

biopgoo
Hello,

I have configured a Profile to send backups all the databases of a site to S3. I have indicated that the daily backups be generated through the local command line backup.php with a daily cron job. I have selected zip`files as the archiving method due to the ease of recovering data as all operating systems can deal with zip. The backup files are zero bytes. I am using 3.0.15 and with 3.0.14 got a 2MB zip file which was corrupt. With 3.0.15 the zip files in Amazon S3 are 0 bytes

For the rest, I was able to open a two part zip file with the archive manager. For the rest, I am a happy camper as I have set the part size to 250 MB and there are no complaints. Same thing with the Windows extract wizard with a two part jpa file.

Love

biopgoo
Ok,

We got the 0KB SQL files because we had selected Zip using Zip Archive class. When I changed the engine to ZIP it worked correctly.

Love

breathwork
I am still having problems even with the line added. Attached is the log file...##text##

steph.s
If you look above in the thread to the lines Nicholas highlighted you will see that you still have this line in your error log:
INFO |101129 00:00:08|PHP Interface :cgi-fcgi

Have you tried his recommendations?

You are using the PHP CGI binary which is designed to serve web pages, not run command-line PHP scripts (like Akeeba Backup's backup.php). It has a preconfigured time limit of 30 seconds, which makes the script time out. As per the documentation, you have to use the path to the PHP CLI (CLI = Command Lie Interface) binary in your CRON job's command-line. If you are unsure about this path, ask your host. If they reply with the same path you're using, escalate your support request until you get to talk with a support technician who can actually spell PHP and who can help you with that.

nicholas
Akeeba Staff
Manager
@biopgoo Yes, the ZIPArchiver engine tries to use PHP's ZIP class to handle the file compression. Since we have no control with the specifics of the compression we consider it only suitable for very small sites running on quite beefy servers. If you try to compress a large file with it, it will result to a 0 byte file. Using the regular ZIP engine or the JPA engine is the recommended method of backup.

@breathwork It is quite apparent that your host won't allow you to go over that maximum execution time limit they have set in their PHP CGI binary. The only technically possible workaround is to ask them which is the path to the PHP CLI (Command Line Interface) binary on their server, then use it in the CRON command line as per the instructions in our documentation. This is a limitation of how PHP works so there's only that much we can do about it.

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!