Cron job not working with Akeeba Backup and Joomla

Asked by:
ebohatch
Time:
2011-09-30 8:32 pm
Category:
Cpanel
Hits:
1,315
<p>I setup a cron job with the following: php -q /home/nwilin5/public_html/adsfreemidwest.com/index.php?option=com_akeeba&amp;view=backup&amp;key=********* I get back "no input file specified" But when I run the job in a browser: htto://www.adsfreemidwest.com/index.php?option=com_akeeba&amp;view=backup&amp;key=*********</p>
<p>it runs fine I am using Joomla on this site.</p>
<p>(note, * represent secret code/password)</p>

You must login before you can ask a follow up question.

You must login before you can submit an answer.

Best answer chosen by Web Hosting Hub staff

0

ChristiNi
2011-09-30 9:30 pm
Hello ebohatch,

Great question about using cron jobs with Akeeba. I gathered the following information from the Akeeba documentation which I found here:

http://downloads.joomlacode.org/frsrelease/5/4/7/54711/akeeba-backup-guide.pdf

It looks like what you are wanting to do is automate Akeeba Backups with Joomla. I would suggest changing your "SuperAdmin18907" key as this is a public site that everyone can view.

You will first want to create a php file named backup.php. I recommend placing that file in a folder above public_html, /home/nwilin5/backups would be a good place. So, the full path to the file would be home/nwilin5/backups/backup.php

In the backup.php file place the following code. I've formatted everything far you except for the secret key which you will need to place between the single quotes. Please note, you will need to add the opening and closing php tags in the file:

define('SITEURL', 'http://www.adsfreemidwest.com'); // Base URL of your site
define('SECRETKEY', 'MySecretKey'); // Your secret key
define('PROFILE',1); // The profile's ID
// ====================== DO NOT MODIFY BELOW THIS LINE ======================
$curl_handle=curl_init();
curl_setopt($curl_handle,CURLOPT_URL,
SITEURL.'/index2.php?option=com_akeeba&view=backup&key='.
SECRETKEY.'&format=raw&profile='.PROFILE.'&format=raw');
curl_setopt($curl_handle,CURLOPT_FOLLOWLOCATION,TRUE);
curl_setopt($curl_handle,CURLOPT_MAXREDIRS,10000); # Fix by Nicholas
curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
$buffer = curl_exec($curl_handle);
curl_close($curl_handle);
if (empty($buffer))
echo \"Sorry, the backup didn't work.\";
else
echo $buffer;



After you've saved your backup.php file, you will want to create a cron job that calls that file:

php -q /home/nwilin5/backups/backup.php

I hope this information helps!

Thank you,

Christi N.

You must login before you can post a comment about this answer.

Like this Question?

Support Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.