Support

Documentation

Alternative CRON script

[Tip]Tip

This option is only available in the Akeeba Backup Professional releases. You need to subscribe to the Professional edition to use it.

[Warning]Warning

This is an optional, advanced and DANGEROUS feature. If you check for failed backups while a backup is still running it is very possible that you will cause the backup to fail! We recommend scheduling backup checks a substantial amount of time (e.g. 1 hour) after the expected end time of your backups.

On some hosts it is impossible to use the native CRON script outlined in the previous section. In order to accomodate for these hosts, Akeeba Backup Professional includes an alternative CRON script. The alternative CRON script performs the failed backup check by using the front-end bacup check URL of Akeeba Backup. The alternative CRON script is located in cli/akeeba-altcheck-failed.php, and must be run from the command-line PHP interface (PHP CLI).

In order to schedule a backup, you will have to use the following command line to your host's CRON interface:

/usr/local/bin/php /home/USER/webroot/solofolder/app/cli/akeeba-altcheck-failed.php

where /usr/local/bin/php is the path to your PHP CLI executable, /home/USER/webroot is the absolute path to your web site's root and solofolder is the name where Akeeba Solo is installed. You can get this information from your host.

In order to give an example, we will assume that your PHP CLI binary is located in /usr/local/bin/php (a common setting among hosts), your web site's root is located at /home/johndoe/httpdocs and your Akeeba Solo folder is named solo.

usr/local/bin/php /home/johndoe/httpdocs/solo/app/cli/akeeba-altcheck-failed.php

If you are using Akeeba Backup for Wordpress, the command is slighty different:

/usr/local/bin/php /home/USER/webroot/wp-content/plugins/akeebabackupwp/app/cli/akeeba-altcheck-failed.php

Special considerations:

  • This script is not meant to run from a web interface. If your host only provides access to the CGI or FastCGI PHP binaries, akeeba-altcheck-failed.php will not work with them.

  • You must enable the front-end backup feature of your Akeeba Solo installation and assign a "secret key" for it. This is possible by going to the Akeeba Solo's Control Panel page and clicking on the System Configuration button on the lower part of the page. You will find the front-end backup options further down the Parameters page.

  • Before using the alternative CRON script for the first time, you must visit the Akeeba Solo's Control Panel page at least once. Since the command-line version of PHP used to run the backup is oblivious to the domain name used by your site, we have to cache this information. Caching of this information occurs as soon as you visit the Control Panel page. The host name is absolutely required in order for the script to be able to access your Akeeba Backup installation's front-end backup feature.

  • Your host must support one of the three methods used by the helper script to access your front-end backup URL:

    1. The PHP cURL module.

    2. The fsockopen() method

    3. The fopen() URL wrappers

    If none of these methods is available, the backup will fail.

  • Your host may have a firewall setup which doesn't allow the CRON script to access the front-end backup check URL. In such a case, the backup check will consistently fail. You will have to contact your host so that they can allow the script to access the front-end backup check URL. Do note that despite the alternative CRON script and your site running on the same server, the firewall restriction might still be in place. This is counter-intuitive, but we've seen this happening on many hosts.

Setting up a CRON job on cPanel

Go to your cPanel main page and choose the CRON Jobs icon from the Advanced pane. In the Add New CRON Job box on the page which loads, enter the following information:

Common Settings

Choose the frequency of your backup, for example once per day.

Command

Enter your backup command. Usually, you have to use something like:

/usr/bin/php5-cli /home/myusername/public_html/solofolder/app/cli/akeeba-altcheck-failed.php

If you are using Akeeba Backup for Wordpress:

/opt/php53/bin/php /home/myusername/public_html/wp-content/plugins/akeebabackupwp/app/cli/akeeba-altcheck-failed.php

where myusername is your account's user name (most probably the same you use to login to cPanel) and solofolder is the firectory where Akeeba Solo is installed. Do note the path for the PHP command line executable: /usr/bin/php5-cli. This is the default location of the correct executable file for cPanel 11 and later. Your host may use a different path to the executable. If the command never runs, ask them. We can't help you with that; only those who have set up the server know the changes they have made to the default setup.

Finally, click the Add New Cron Job button to activate the CRON job.

Special notes for GoDaddy

According to our users who have tried this, this alternative script does work with GoDaddy. The command line you have to use is:

/usr/local/php5/bin/php "$HOME/html/solofolder/cli/akeeba-altcheck-failed.php"

Or if you are using Akeeba Backup for Wordpress:

/usr/local/php5/bin/php "$HOME/html/wp-content/plugins/akeebabackupwp/app/cli/akeeba-altcheck-failed.php"

The PHP executable we are using is the CLI rather than the default CGI. This is important; if you use the CGI executable then the script will not run. Don't forget to enable frontend backup and insert your secret word. To enable frontend backup go to Akeeba Backup under components, select configuration, select options from the navigation, then select the front-end backup tab to enable the settings.

Cookies Notification - Action required

This website uses cookies to provide user authentication and improve your user experience. Please indicate whether you consent to our site placing these cookies on your device. You can change your preference later, from the controls which will be made available to you at the bottom of every page of our site.