Support

Akeeba Backup for Joomla!

#25257 S3 Access Key Override Not Working from CRON

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 on Wednesday, 29 June 2016 17:20 CDT

[email protected]
Greetings. We have been using Akeeba via a CRON job to backup a number of sites for quite some time very successfully! Our backup profile uses Amazon S3 post proc, but the Akeeba profile we use does not contain the access key or secret key for security purposes. Instead, we provide these (and other variables) via command line override. Starting somewhere between Akeeba Pro version 4.6.1 through 4.7.2, this stopped working. Sites on the older Akeeba 4.6.1 work fine, but anything on 4.7.2 or later (including 5.0.4 and 5.1.0b2) will not work on the same server. I have reviewed the changelogs for each of these Akeeba versions, and did not notice anything I thought might be relevant.

We first tried looking to ALICE for support, which provided the message:
[160528 23:43:30] Failed Smart algorithm on Akeeba\Engine\Core\Domain\Finalization


When I dig further and ran the CRON command manually with the --quiet flag removed, I received the following error:
An error has occurred:
You have not set up your Amazon S3 Access Key

Sounds simple enough, but the override is provided. In fact, when not using --quiet to run the CRON job, I see the following at the top of the CRON output:
Configuration variables overridden in the command line:
"engine.postproc.amazons3.accesskey, "engine.postproc.amazons3.secretkey, "akeeba.basic.archive_name, "engine.postproc.amazons3.directory


The quotes appeared odd to me, so I did verify that I am escaping the quotes as I have for some time per one of the other support incidents on this site. I also tried removing the escaping slashes, as well as removing quotes completely, both of which failed. A typical CRON job call will look like this (we use a script which calls something like below for each Joomla site):

/opt/cpanel/ea-php55/root/usr/bin/php /home/username/www/cli/akeeba-backup.php --profile=2 --quiet --override=\"engine.postproc.amazons3.accesskey=ABCDEFG\" --override=\"engine.postproc.amazons3.secretkey=ABC123\" --override=\"akeeba.basic.archive_name=username-servername-daily-[DATE]-[TIME]\" --override=\"engine.postproc.amazons3.directory=servername-user\"


In checking our server error logs, I also do see a number of errors repeating a lot, similar to below:
[28-May-2016 23:26:38 UTC] PHP Warning:  array_pop() expects parameter 1 to be array, string given in /home/username/public_html/administrator/components/com_akeeba/AliceEngine/core/domain/checks/filesystem/largedirectories.php on line 98
[28-May-2016 23:26:38 UTC] PHP Warning:  call_user_func() expects parameter 1 to be a valid callback, function '_onSerialize' not found or invalid function name in /home/username/public_html/administrator/components/com_akeeba/AliceEngine/factory.php on line 136


I have attached a log file from one of the sites we are using to troubleshoot. Please let me know if you need any other information to help troubleshoot. Thank you.

nicholas
Akeeba Staff
Manager
First of all, please do not escape the quotes. It's invalid syntax for the operating system's command line shell that runs the CRON jobs. The settings are meant to be expressed as
--override="engine.postproc.amazons3.secretkey=ABC123"


There seems to be a bug regarding configuration overrides. Can you please install the latest dev release where I have applied a fix for that and let me know if you can confirm the fix?

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!

[email protected]
Nicholas,

Thanks for the quick response. I installed rev3D29375 (2016-05-30) on one of the sites, then re-ran the CRON job without the escaping of quotes as we had used previously, and it ran perfectly! I realized that the escaping was inside of a separate script, not actually the CRON command itself, so the escaping was removed by the script. Oversight on my part.

Should we install rev3D29375 (2016-05-30) on all of our sites for the moment, or should we wait for the next release with this patch included?

Thank you again!

nicholas
Akeeba Staff
Manager
Hello Todd,

Hold off the installation. I am currently in a (delayed) plane back home. Tomorrow evening Eastern European Time I will release 5.1.0.b2 which includes this fix as well as a fix for a tricky issue regarding JSON API backups. As long as you have set up Joomla to use Beta as the minimum stability for updates on all of your sites then you will see the new release and be able to update automatically to 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!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

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!