Support

Akeeba Backup for Joomla!

#14365 setting a cron backup on local server

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 Thursday, 13 December 2012 03:55 CST

chrisber

Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the tickets before posting? Yes
Have I read the documentation before posting (which pages?)? Yes
Joomla! version: 2.5.8
PHP version: 5.3.3
MySQL version: (unknown)
Host: Local server (Linux Open Suse)
Akeeba Backup version: Pro 3.6.10

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:

Hi,

I have 2 sites : one (www.) on a distant server (Bluehost) and one on a local server (on Linux Open Suse) only for an intranet.

For Bluehost : fine, they propose a cron Task manager.

But for the Local Server : how (and wher) can I do to set a Native Cron automated Backup (for example, every 7 days), as I read also that you recommend to NOT use the Lazy Scheduling plugin ?

Thanks for your help

Chris

 

nicholas
Akeeba Staff
Manager

Hello Chris,

I assume that your local server is up 24/7 and you have SSH or physical termina access to it. It should be a matter of editing your crontab. I would suggest doing a

man crontab

from the command line to see how it works. You will of course need to know what's the path to your PHP CLI binary, e.g.

which php

and make sure it is indeed PHP CLI:

php -v | grep cli

should return something like:

PHP 5.3.14 (cli) (built: Jul  2 2012 08:56:54)

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!

chrisber

Thanks Nicholas,

First, I have to admit that I am a total amator concerning php.

That means, I can repeat (try to at least) thing but can't really understand them whe it come to php or even dos command.

I type the instruction "cron tab" in a Konsole window directly on the Linux server: it says in return => "cron: can't lock /var/run/cron.pid, otherpid may be 3029: Ressource temporarily unavailable"

?

nicholas
Akeeba Staff
Manager

So, your question is actually about how to manage a Linux server. I can't offer support on that as it's been a very long time since I last used Suse (the last time was around 2003-2004). Since you're using KDE you may want to take a look at KCron. According to this documentation page: http://userbase.kde.org/KCron you can go to System Settings -> System Administration section -> Task Scheduler. The command line you have to use is shown in Akeeba Backup, Scheduling Information. That's as far as I can help you with this.

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!

chrisber

Ok

I found how to and installed Kcron on the server

I think all I need now is some help to define the path to php. I think I should put "usr/local/bin/php" but is it correct ?

chrisber
I set a task for this night 
will see

nicholas
Akeeba Staff
Manager

usr/local/bin/php should be /usr/local/bin/php. The leading slash is very important.

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!

chrisber

Hi Nicholas

What's great is that the cron task worked fine on my local server.

Unfortunately, it is on the Bluehost server that it didn't. I thgink it is probably due to the path to the php CLI that is not good.

chrisber

I send a mail to Bluehiost to verify the path.

But in the meantime, I set like in your example (considering CPanel version is 11.32.5) :  /usr/bin/php5-cli

Do you think maybe I should just try : /usr/bin/php

nicholas
Akeeba Staff
Manager

The most common paths I've seen are:

/usr/bin/php5-cli
/usr/local/bin/php5-cli
/usr/bin/php-cli
/usr/local/bin/php-cli
/usr/bin/php
/usr/local/bin/php
/usr/bin/php5
/usr/local/bin/php5

The thing is that the name varies wildly and some of those are actually the PHP5 CGI (not CLI) which won't work properly or at all. The only way to know for sure is asking your host.

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!

chrisber

I found this path in some examples they give in their help section  : /ramdisk/bin/php5

I will try it in the meantime of their answer.

Just one last question : do I need to specify a particular php.ini file with the flag -c ?

nicholas
Akeeba Staff
Manager

Just one last question : do I need to specify a particular php.ini file with the flag -c ?

Normally not, unless your host told you to do otherwise.

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!