Support

Akeeba Backup for Joomla!

#8906 Plesk 10.2 Schedule cron task php path

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, 22 June 2011 01:47 CDT

toomanylogins
Mandatory information about my setup:

Have I searched the forum before posting? Yes
Have I read the Troubleshooting Wizard before posting? yes
Have I read the documentation before posting? yes
Joomla! version: 1.5.22
PHP version: 5.3.2
MySQL version: 5.1.4
Host: VPS ubuntu plesk 10.2
Akeeba Backup Professional version: 3.3.a3
No log as backup not called.

I am trying to work out the path to PHP executable for plesk
from phpinfo
_SERVER["PATH"] _SERVER["PATH"] /usr/local/bin:/usr/bin:/bin:/usr/bin:/bin

so tried
/usr/local/bin and /usr/bin nothing runs the task scheduler is running because I get an error if I include incorrect path.

PHP is running as Apache module I am not sure if php-cli is installed?

Do I need to use cgi ?

Please advise as we cannot use the lazy plug-in and therefore we are not getting scheduled backups.

nicholas
Akeeba Staff
Manager
You have to know the absolute path to the PHP CLI binary. Alternatively, you may be able to use the PHP CGI binary but that is not recommended, as you may run into timeout issues. Unfortunately, I have not set up the server you are hosted on and can not answer your question :( The only persons qualified to answer this question (what is the absolute path to PHP's CLI binary) is your host's technicians. They (should) know how the server is set up and can help you with that.

If you get nowhere with that, you can always use the front-end backup feature with wget or curl to schedule your backups. This is the most reliable backup automation method that has been around and battle tested since about four years ago.

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!

toomanylogins
Ok before I try front end can you tell me how I can tell if cli is installed ?

nicholas
Akeeba Staff
Manager
Eh, that's not possible to answer if you have not setup the server, so you can find out only by asking your host. They will give you a path to a PHP binary, let's say /usr/local/bin/php-cli. You will use it to create a CRON job. Then, take a look at the generated log file (the CLI origin). Towards the top of the file it tells you if PHP runs as an Apache module, CGI or CLI. If it reads CLI, it's OK. If it reads CGI and you get no timeout issues, it's OK too. If it reads CGI and you get timeout issues, try the front-end method.

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!

toomanylogins
Trying wget. However docs do not define

key=YourSecretKey"

where do I enter key ? I cant see it in the config

nicholas
Akeeba Staff
Manager
Go to Components, Akeeba Backup. Click the "Component Parameters" button (the one with a gray cogwheel icon). You will have to set "Enable front-end and remote backup" to Yes. Right below it you can enter the Secret Key of your liking.

Tip: It's best to use a secret key consisting of only lower & upper case alphanumeric characters (0-9, a-z, A-Z). Other characters need to be URL-escaped in the wget command-line. Every time I have tried doing that, I always did mistakes writing the command line. Keep the secret word lengthy (about 30-40 characters will do) but using only simple, URL-safe characters.

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!

toomanylogins
Thanks, I dont think I have cli installed trying wget and cgi at moment.

I have this entry recurring in the log

[110620 18:32:23] -- Stored Akeeba Factory (backend) not found - hard reset

nicholas
Akeeba Staff
Manager
You are not looking at the correct log file. In the log viewer page you can select the origin you want to see the log file for. If you are using the wget with the front-end backup feature, you have to select the "Front-end" origin in the drop down (you are currently selecting the back-end origin, that's why you see the repeated messages).

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!

toomanylogins
Hello

I think I am nearly there.

php -f /var/www/vhosts/abc.com/httpdocs/administrator/components/com_akeeba/backup.php
the
I can run php as cli from root but get error the

Could not open input file: /var/www/vhosts/abc.com/httpdocs/administrator/components/com_akeeba/backup.php

Do I need to set permissions on backup.php?
Thanks
Paul

toomanylogins
Sorry meant to say it runs ok as root but the error occurs when run as cron task in plesk

nicholas
Akeeba Staff
Manager
Yes, this sounds like a permissions issue. Perhaps you have to chmod 0755 administrator/components/com_akeeba and all of its directories, as well as chmod 0644 all files contained therein. This should give adequate privileges to access the command-line version of Akeeba Backup's backup script.

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!

toomanylogins
OK it is perms issue. Under plesk the site runs as user "www-data" however the plesk system user is "another-user" and the cron taks run as as this user. I am trying to resolve if anyone has akeeba cron running under plesk let me know. I have multiple sites so I would prefer a different option to your suggestion as I just nessed up the site I am testing on changing the permissions manually.

thanks
Paul

nicholas
Akeeba Staff
Manager
In that case you can use the front-end backup feature with wget or curl to automate your backups with a CRON job. Since that feature is calling a URL on your site it doesn't matter which user it runs under (everything is done over the web).

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!