Support

Akeeba Backup for Joomla!

#8348 Cron jobs in Akeeba Backup Pro for Newbie

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 Wednesday, 03 March 2010 06:09 CST

user8587
Hi there,
I'm having trouble finding out how to setup Cron jobs in Akeeba B Pro...

I was under the impression it would be available under the admin panel...
I've been looking at alex walker's video tutorial for joomla pack and the icons look very different (he has many more that I'm not recognising ).

your help in getting this going is much appreciated.

Boris

dlb
There are significant differences between the JoomlaPack control panel and Akeeba's. The alpha1 version of Akeeba is not feature complete. Nicholas will have to comment on the status of cron jobs.


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
I have fallen back on the documentation bit :( Akeeba Backup Pro has a native CRON job feature which doesn't require enabling the front-end backup mode. All you need to do is run the file administrator/components/com_akeeba/backup.php from a command line PHP interface. For instance, you could have your CRON job run something like:
/usr/bin/php administrator/components/com_akeeba/backup.php --profile 1
where /usr/bin/php is the path to your command-line PHP binary (ask your host) and 1 is the ID of your profile.

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!

spfaehler
Sorry for being silly, but I am also a newbie and purchased Akeeba Backup Pro specifically for the CRON job auto backup feature.

Do you enter the "/usr/bin/php administrator/components/com_akeeba/backup.php --profile 1" in the command line of the Cron Jobs section in Cpanel?

Also, I only have ONE profile, so do I leave the "1" in my code?

Kind Regards,
.:Seth

dlb
Yes, except that the are supposed to be format tags for the forum, you're not supposed to see them, so leave them out of your command line. :)


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)

user8587
So I have realised I need to add controllers/
to the line Nicholas entered for it to work... obvious when you know it... but took me a second to figure out..

so I'm running this in my cron job... with the following
php mydirectoryinfo/components/com_akeeba/controllers/backup.php --profile 1

however I'm getting a restricted access error (when using cron and putty)

how do I resolve this?

nicholas
Akeeba Staff
Manager
No, no, you don't need to add controllers to it. The path is supposed to be like I wrote it. Inside administrator/components/com_akeeba there is a file named backup.php. This is the file you need to run. But, let me stress this, it's in the backend (administrator) directory, not the front-end. The command is (I hope this time the code tag works):
/usr/bin/php /path/to/your/site/root/administrator/components/com_akeeba/backup.php --profile 1

If the backup.php file is not there, make sure that you have installed Akeeba Backup Professional. If the file is corrupt, please let me know - the new auto-packaging scheme is in experimental format and may have produced a broken archive.

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!

dlb
Nicholas,

My Pro system agrees with Boris', the backup.php file is under controllers, not in com_akeeba.


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
This was a bug in the automatic packing system. I fixed it - along with other bugs - and uploaded a new version in the subscribers download section (My Downloads). Please download and use the new version instead.

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!

user8587
Two things:
1) I've just downloaded and installed com_akeeba-3.0.a1.1-pro.zip. The backup.php is still in the controllers sub folder.
I don't mind as long as it works...

however...

2) When I run /components/com_akeeba/controllers/backup.php --profile 1 I get the following response from putty...
X-Powered-By: PHP/5.2.11
Content-type: text/html

Restricted Access

Is this something to do with Akeeba? What can I do to resolve this?

nicholas
Akeeba Staff
Manager
The backup.php in the controllers directory is not the one you want. This is the controller file of the Backup Now page. It's meant to be called by Joomla!. It is not the file which does the CRON backup. It is supposed to be there, but not called directly. Giving you "Restricted Access" is a good sign. It really means that I was careful enough not to allow directly calling a file which isn't supposed to support such an action. There is nothing wrong with Akeeba. I just thing you misunderstood my previous post.

I have installed the same Pro release file you got on AkeebaBackup.com (naturally!). The file administrator/components/com_akeeba/backup.php exists and I can call it from a CRON job. Let's make sure you can, too. Open your FTP client. Navigate to administrator, then components, then com_akeeba. Do not enter inside any subdirectory! You should see a file named backup.php with a size around 4Kb. If it's not there, or has 0 length, tell me so. Do not try to find it anywhere else. It must be there. Now, this is the file you have to call in the CRON job.

So, can you please verify that the file is there and then try the command line for the CRON job I gave on my first post? This should do the trick ;)

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!

user8587
Appologies for not being clearer in my earlier message. The current contents of my com_akeeba folder is as follows:

controllers
models
views
akeeba.php

There is no backup.php file in this directory for me.

nicholas
Akeeba Staff
Manager
You do not have Akeeba Backup Professional installed :/ The Professional edition has a directory named "plugins" and a file named "backup.php". Just try to uninstall your Akeeba Backup completely, then install the Professional package. If the "plugins" directory and "backup.php" do not show up in the administrator/components/com_akeeba/ directory, something's wrong with your installation.

Just to make sure we are on the same page here keep our sanity levels high :) Joomla! has two "components" directories. One on your site's root, the other inside the "administrator" subdirectory. You have to look for com_akeeba inside the components directory which is inside the "administrator" directory. If you're looking elsewhere, we are talking apples and oranges - which would explain why we don't make any sense.

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!

user8587
Right so that's where I was going wrong!

Simple when you know how... painful finding out but the good news is you don't forget the lesson...

So the backup is working fine now... and the orange juice is just lovely.

Thanks

nicholas
Akeeba Staff
Manager
LoL! That's the tough thing with the human life: the exams come first, the lesson is taught later :D Well, I am glad it's working properly now!

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!