Cron job not working with Akeeba Backup and Joomla

Asked by:
ebohatch / 21 Points
Time:
2011-09-30 4:32 pm EST
Category:
Cpanel
Hits:
2,624
<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>

To ask this user for more information, please first login.

To submit an answer, please login.

Best answer chosen by Web Hosting Hub staff

0

ChristiNi
Staff
9,518 Points
2011-09-30 5:30 pm EST
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.

To submit a comment on this answer, please first login.

Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!

Help 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.