Support

Akeeba Backup for Joomla!

#26450 Can't run CRON with cli script on a Synology NAS

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 dlb on Tuesday, 01 November 2016 18:32 CDT

guzabi
Hello,

No ZIP file because the issue is precisely that nothing happens :-)

I'm trying to automate a backup on a website that is hosted on a Synology Diskstation. Attention, this is NOT a production website per se, I do know the limitations of the Synology acting as a webserver :-) It's only a "prototype" that I use when creating clients website. I simply duplicate this empty website and start from there for the clients site.

I'd like to automate the backup process using the "scheduled tasks" from Synology DSM (there is no real CRON in the system, but this works). I can create a scheduled task that does access the CLI script. The scheduled task runs but the backup does not work.

In order to troubleshoot, I'm running the exact same command line I'm using in the script but from an SSH shell. The script exits after less than a second of execution with no error message :
$ php /volume1/web/joomla/cli/akeeba-backup.php --profile=2
Akeeba Backup CLI 5.2.4 (2016-10-28)
Copyright (c) 2006-2016 Akeeba Ltd / Nicholas K. Dionysopoulos
-------------------------------------------------------------------------------
Akeeba Backup is Free Software, distributed under the terms of the GNU General
Public License version 3 or, at your option, any later version.
This program comes with ABSOLUTELY NO WARRANTY as per sections 15 & 16 of the
license. See http://www.gnu.org/licenses/gpl-3.0.html for details.
-------------------------------------------------------------------------------

You are using Joomla! 3.6.4 on PHP 5.6.11 (cli)

Starting a new backup with the following parameters:
Profile ID  2
Description "Command-line backup"

Current memory usage: 2.31 Mb

Unsetting time limit restrictions.

Site paths determined by this script:
JPATH_BASE : /volume1/web/joomla
JPATH_ADMINISTRATOR : /volume1/web/joomla/administrator


I have kind of a more detailed error message when running the ALT script :

$ php /volume1/web/joomla/cli/akeeba-altbackup.php --profile=2
Akeeba Backup Alternate CRON Helper Script version 5.2.4 (2016-10-28)
Copyright (c) 2006-2016 Akeeba Ltd / Nicholas K. Dionysopoulos
-------------------------------------------------------------------------------
Akeeba Backup is Free Software, distributed under the terms of the GNU General
Public License version 3 or, at your option, any later version.
This program comes with ABSOLUTELY NO WARRANTY as per sections 15 & 16 of the
license. See http://www.gnu.org/licenses/gpl-3.0.html for details.
-------------------------------------------------------------------------------
Unsetting time limit restrictions.

Site paths determined by this script:
JPATH_BASE : /volume1/web/joomla
JPATH_ADMINISTRATOR : /volume1/web/joomla/administrator



********** ERROR! **********

The MySQL adapter mysqli is not available

Technical information:

Code: 0
File: /volume1/web/joomla/libraries/joomla/database/driver/mysqli.php
Line: 173

Stack Trace:

#0 /volume1/web/joomla/libraries/joomla/database/driver/mysqli.php(244): JDatabaseDriverMysqli->connect()
#1 /volume1/web/joomla/libraries/joomla/database/driver.php(1859): JDatabaseDriverMysqli->escape('component')
#2 /volume1/web/joomla/libraries/joomla/database/driver.php(477): JDatabaseDriver->quote('component', true)
#3 /volume1/web/joomla/libraries/fof30/Params/Params.php(54): JDatabaseDriver->__call('q', Array)
#4 /volume1/web/joomla/libraries/fof30/Params/Params.php(54): JDatabaseDriverMysqli->q('component')
#5 /volume1/web/joomla/libraries/fof30/Params/Params.php(41): FOF30\Params\Params->reload()
#6 /volume1/web/joomla/libraries/fof30/Container/Container.php(483): FOF30\Params\Params->__construct(Object(FOF30\Container\Container))
#7 /volume1/web/joomla/libraries/fof30/Pimple/Container.php(112): FOF30\Container\Container->FOF30\Container\{closure}(Object(FOF30\Container\Container))
#8 /volume1/web/joomla/libraries/fof30/Container/ContainerBase.php(27): FOF30\Pimple\Container->offsetGet('params')
#9 /volume1/web/joomla/administrator/components/com_akeeba/BackupPlatform/Joomla3x/Platform.php(709): FOF30\Container\ContainerBase->__get('params')
#10 /volume1/web/joomla/administrator/components/com_akeeba/BackupEngine/Platform.php(275): Akeeba\Engine\Platform\Joomla3x->get_platform_configuration_option('siteurl', '')
#11 /volume1/web/joomla/cli/akeeba-altbackup.php(140): Akeeba\Engine\Platform->__call('get_platform_co...', Array)
#12 /volume1/web/joomla/cli/akeeba-altbackup.php(140): Akeeba\Engine\Platform->get_platform_configuration_option('siteurl', '')
#13 /volume1/web/joomla/cli/akeeba-altbackup.php(503): AkeebaBackupCLI->execute()
#14 {main}


I do not see any task (even a failed one) in the "Manage backups" page of Akeeba Backup, so there is really no log or other information I could send here. Could you please help me troubleshoot this?

Thanks.

dlb
It stopped too quickly to even start a log file. The ALT error message tells the story:
The MySQL adapter mysqli is not available
The PHP-CLI and PHP-CGI/FCGI are two completely different installations of PHP. The MySQL support - or at least the MySQLi (note trailing i) driver are missing from your command line version of PHP. You need to install that module.

You may be able to work around it by changing the MySQL driver in your Joomla! Global Configuration screen to mysql (no trailing i). But if the command line MySQL support is missing altogether that will not work. The mysql driver is obsolete and the mysqli driver is newer and faster and better.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

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!