Support

Akeeba Backup for Joomla!

#20808 Backups not transferred to Remote FTP server with cronjobs in Ubuntu 14.04 (PHP5.5.9)

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, 28 August 2014 08:18 CDT

Plugje
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:
I have problems to get my Remote FTP backups to the FTP server when runned in a cronjob. I am pretty sure it is related to the latest Ubuntu 14.04 version which use PHP 5.5.9.

This is the case. I made a separate profile in Akeeba for these cronjob. First I run the configuration wizard for this profile. Then I set the "Data processing engine" to "Upload to Remote FTP server". When I make a backup with this profile in the Joomla Akeeba backpanel it's transferring the files to the remote server. So that's ok. When I check the backend log I see on the beginning some PHP parameters like Max. exec. time:120, Memory limit: 128M etc. Further I see in the log that the script is connecting to the FTP server and transferring the files.
Now I make a cronjob with this command: /usr/bin/php /home/xxxxxx/public_html/cli/akeeba-backup.php --profile=2 --description="Cron backup to FTP". When I run this cronjob there are no errors. But the time it use is very short. Afterwards when I check the backups in Akeeba I see that there is a Command-line backup, BUT...the file is still on the server. There is a link: Transfer Archive (ftp). When I click on this link the file(s) are transferred to the FTP server. So no problem with the connection. But this should be done already in the script.
So now I check the commandline logfile. First thing I see in the beginning is that there are almost no PHP parameters. And some are totally wrong, like Max. exec. time:0; Memory limit: -1. At the end of the log there are no records for FTP transfer. For some reason the script doesn't transfer them.
Also when I have a huge site with 150MB files and I set the Archiver engine to split them in files from 50MB the script is generating ONE big file from 150MB. I can see in the log that the slitting is ignored. When I make the same backup in the backpanel with the same profile the cronjob is using the files are spit in 3 files from around 50MB and one smaller. So there it is working.

It took a while to figure out the problem. On the server with Ubuntu 14.04 these cron backups are not working with FTP. When I make a backup from the site on that server and put it on a server with Ubuntu 12.04 cronjobs are working and files are transferred. So it's not related with the installation from Joomla and Akeeba. When I put a clean Joomla installation on the Ubuntu 14.04 server it's also not working. On a 12.04 server it's working.

The strange thing is that when I check the commandline log from the 12.04 server I see also missing PHP parameters.But at the end I see that the script is transfering the files to the FTP server.
Also when I run the troubleshooter ALICE there are errors in the log, for instance Availible memory. But both servers give the same error, and one is working. Also the availible memory is more then 4Mb. Think it's related to the wrong PHP parameters in the logs.

Last but least..Ubuntu 14.04 use Opcache. I noticed already that it's causing problems with PHP so I disabled Opcache on this server.

Can you please check it? I can provide you logins etc.

nicholas
Akeeba Staff
Manager
As you have determined this is a server issue. Unfortunately we can't debug servers for you. Server issues can only be reasonably debugged by the people who set up the servers and know exactly how they are set up. Please contact your host about it.

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!

Plugje
Well, I don't think it is a server issue, but I will do some more test. Can you confirm it's working with PHP5.5.9?

I will see if I can find another hosting/server with PHP5.5.9 to check if it is working there.

nicholas
Akeeba Staff
Manager
I have it already running smoothly in an Ubuntu Server 14.04 virtual machine with the stock PHP included in Ubuntu so yes, I can confirm that it should work. I think you simply forgot to enable the mcrypt PHP library in the PHP CLI php.ini file. Therefore Akeeba Backup can't decrypt the settings of the backup profile, ignores them and performs a backup with the factory default settings (single part, no post processing). Makes 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!

Plugje
Thanks Nicholas, you have point me in the good direction!

Somehow in the default Ubuntu 14.04 installation the mcrypt.ini is not parsed in the Additional .ini files. I overlooked that because I saw in the php information that mcrypt was enabled.

For everybody with the same problem, this is the solution:
start a ssh session with Putty and run this command:
$ sudo php5enmod mcrypt


Afterwards restart apache:
$sudo service apache2 restart


When you check the php information in Joomla System Information you will now see almost at the top this:
Additional .ini files parsed: /etc/php5/cgi/conf.d/20-mcrypt.ini

Thanks again, happy that I still can use Akeeba to backup my sites!

nicholas
Akeeba Staff
Manager
You're welcome :)

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!