Support

Akeeba Backup for Joomla!

#26446 How to setting up a native cron task

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 dlb on Wednesday, 02 November 2016 11:35 CDT

thefbi
EXTREMELY IMPORTANT: Please attach a ZIP file containing your Akeeba Backup log file in order for us to help you with any backup or restoration issue. If the file is over 2Mb, please upload it on your server and post a link to it.

Description of my issue:

Hello,
i have read many times the documentation for create a cron backup. I have perform many frontend auto backup with sites like setcronjob and it work fine, but sometimes not...

I am interressed to perform a native cron task, and i understand that is a command to put to perform the backup, but that i can understand, that where i have to put the command and how ? I can't find any solution for that all around the web.

I am not programmer and dont know php coding.

I have understand that the backup process is called by a php command, but who give this command ?
Who execute this command ?
I have to install a tool on the server to put the command in ?
How this command is executed automatically, like with setcronjob for example ?

Thanks for help,

Frédéric

dlb
Frédéric,

The CRON service is provided by your host and they would have to help you with the where and how to enter the command. I can help you with what command to use.
  1. You need to have the Pro version of Akeeba Backup installed. This is not available in the Core version. Your license covers the Pro version and you probably already have it installed.
  2. If you look on the Akeeba Backup Control Panel, you will see an option labeled Scheduling Information. You can go there to see what the command should be for your site. The path to the PHP file can change based on how your Joomla! is installed, this tells you exactly the path to use.
  3. This is the tricky part. The first part of the command in #2 calls the PHP executable. This needs to be the command line version of PHP, not the web version that your website runs under. It is sometimes known as PHP-CLI as opposed to PHP-CGI/FCGI for the web version. Your host can tell you the proper path to this executable. You need to be very specific about what you are asking for, lower levels of support frequently do not know the difference.

We also have a video about automating your backup, you can find it here: https://www.akeebabackup.com/videos/1213-akeeba-backup-for-joomla-pro.html.


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)

thefbi
Thank you,

on my host, i have a CRON tool, but i can only put url with http or https, no command, and no more choice to timeout etc.. Thats why i have choose setcronjob for frontend task,

I have ask my host before to tell : can i enter CRON command lines ?

He say to me : Yes, you can enter CRON command line with SSH

But, i still dont understand how.

thefbi
That is a FAQ of my host for CLI :

****
In order to configure PHP command line usage (php-cli), use the PHP setting -d.

For example:

php -d param=value

In this case, PHP will be executed with the value "value" for the setting "param".

Link to this FAQ: https://faq.infomaniak.com/2156
****

And another : https://www.infomaniak.com/en/support/faq/1941

Sorry, but perhaps it is too complicate to understand for me...

dlb
This is a hard question because the PHP and CRON parts are from your host and the backup part is from us. No one has the whole answer, we only have our parts. We are making progress.

If you look at Schedule Automatic Backups in Akeeba Backup (he changed the name on me again and I had it wrong the first time). The first section is for CRON command line backups. The command starts out "/path/to/php" - we have that part from your host, it should be php -d. The next part of the command is a path string ending in "akeeba-backup.php". That is the second part of the command. All we need to do is put them together:
php -d /path/from/screen/akeeba-backup.php
That should trigger a backup using the default backup profile, Profile #1.


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)

thefbi
All we need to do is put them together:


OK, i have understand that, but how i put them ?

If i understund my host, i can make a command line by SSH, so, in case i can connect to ssh and find the good code to put, that mean i have to put it manually.

How it will be automatically perform ?
Thats this point i dont understand.

dlb
Now I understand what you are saying. I know Davide had the same situation a while back. I will ask him how he solved it when he gets in tomorrow.


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)

thefbi
OK,
thank you again :)

dlb
I talked to Davide, he never did get the automatic backup to work on that CRON system. It is just too limited to trigger the backup. We have to call PHP in the command and we have to pass the file that we want to run. Your CRON system just will not let us do that.

There is an alternative. You can use a third party CRON service like webcron.com. It is a pay service, but it is very reasonably priced. You can use it to set up a front end backup (not a command line backup). I use this service personally on a couple of my sites because of time limits for CRON jobs from my host. There are others that provide similar services but webcron.com is the one I know.


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)

thefbi
Hello,

ok, so i use the auto cron with setcronjob, it is the same as webcron, with frontend.

I thought i can get auto backup with native cron... As is marked "recommended" for native cron, that why i ask for realise this.

But thanks for your support.

Regards,
Frédéric

dlb
Frédéric,

Generally a command line PHP backup does not have a time limit and is very fast. But many hosts limit the time that a CRON job can run, like mine does. As long as you are running the job in the middle of the night, you really do not care how long it takes. We are talking a few minutes difference between command line and front end, not hours.

We just can't get the command line backup to run with your current host's CRON restrictions. The end result, the backup archive, is the same no matter which method you choose to produce 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)

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!