Support

Akeeba Backup for Joomla!

#40722 Schedule Automatic Backups

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
4.4.4
PHP version
8.1
Akeeba Backup version
9.9.2

Latest post by tampe125 on Monday, 27 May 2024 10:26 CDT

sabikeuk

Hello,

 

I am having an issue to start automatic backups.

 

I have setup cron with following URL: /usr/bin/php8.1 /var/www/www.estilofina-nabytek.cz/cli/joomla.php akeeba:backup:take 

but getting below error:

Joomla\Database\Exception\UnsupportedAdapterException {#216
  #message: "The MySQLi extension is not available"
  #code: 0
  #file: "/var/www/www.estilofina-nabytek.cz/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php"
  #line: 202
  trace: {
    /var/www/www.estilofina-nabytek.cz/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:202 { …}
    /var/www/www.estilofina-nabytek.cz/libraries/vendor/joomla/database/src/DatabaseDriver.php:1854 { …}
    /var/www/www.estilofina-nabytek.cz/libraries/src/Access/Access.php:952 {
      Joomla\CMS\Access\Access::getAuthorisedViewLevels($userId)
      › // Set the query for execution.
      › $db->setQuery($query);
      › 
    }
    /var/www/www.estilofina-nabytek.cz/libraries/src/User/User.php:445 { …}
    /var/www/www.estilofina-nabytek.cz/libraries/src/Plugin/PluginHelper.php:258 { …}
    /var/www/www.estilofina-nabytek.cz/libraries/src/Plugin/PluginHelper.php:187 { …}
    /var/www/www.estilofina-nabytek.cz/libraries/src/Application/ConsoleApplication.php:255 { …}
    /var/www/www.estilofina-nabytek.cz/cli/joomla.php:77 { …}
  }
}

I have also setup Joomla Scheduled Tasks, when I run test it just says Completed (see screenshot)

I am also attaching a log: https://drive.google.com/file/d/1oC9tPfmgKpPP4P9TwmLbhyICVIZ76Hri/view?usp=sharing

 

Thank you and kind regards,

Daniel

tampe125
Akeeba Staff

Hello,

I suspect that the MySQLi driver is not available while running in CLI. Can you please get inside Joomla Global Configuration and change the database driver to MySQL PDO?

That should fix your issue.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sabikeuk

Hello,

thanks for reply.

 

I have changed database to MySQL PDO, setup cron to run evert 5 minutes, waited 15 minutes but still getting this error from the cron output:

 

Joomla\Database\Exception\UnsupportedAdapterException {#216
  #message: "The MySQLi extension is not available"
  #code: 0
  #file: "/var/www/www.estilofina-nabytek.cz/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php"
  #line: 202
  trace: {
    /var/www/www.estilofina-nabytek.cz/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:202 { …}
    /var/www/www.estilofina-nabytek.cz/libraries/vendor/joomla/database/src/DatabaseDriver.php:1854 { …}
    /var/www/www.estilofina-nabytek.cz/libraries/src/Access/Access.php:952 {
      Joomla\CMS\Access\Access::getAuthorisedViewLevels($userId)
      › // Set the query for execution.
      › $db->setQuery($query);
      › 
    }
    /var/www/www.estilofina-nabytek.cz/libraries/src/User/User.php:445 { …}
    /var/www/www.estilofina-nabytek.cz/libraries/src/Plugin/PluginHelper.php:258 { …}
    /var/www/www.estilofina-nabytek.cz/libraries/src/Plugin/PluginHelper.php:187 { …}
    /var/www/www.estilofina-nabytek.cz/libraries/src/Application/ConsoleApplication.php:255 { …}
    /var/www/www.estilofina-nabytek.cz/cli/joomla.php:77 { …}
  }
}
  Regards. Daniel

sabikeuk

Just found out there is not MySQL pdo on the server. 

however I am running the same configuration of website on other server, there I have no issue with automatic backups. 
Backups were working a few days, I had some message in akeeba control panel about secret word, since automatic backups stopped working.

 

Regards

Daniel

 

tampe125
Akeeba Staff

Hello,

please note that PHP has a different configuration for CLI and web execution. This means that some extensions might be not loaded in CLI, you should report that to your hosting so they can fix it.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sabikeuk

Hello,

 

If I schedule TASK and setup Akeeba Backup – Take a Backup - it supposed to work, but it doens not. Any idea why ?

 

Regards,

Daniel

tampe125
Akeeba Staff

Does the test work correctly?

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sabikeuk

Hello,

I have attached video + photo. It says completed but without any duration. On my other site (where automatic backups works fine) it says  completed + duration  0.09 seconds.

 

Regards,

Daniel

 

tampe125
Akeeba Staff

The quickest solution is to tell your host that PHP CLI is misconfigured and doesn't load the same extensions it's loading in the web server.

Anyway, I think the only solution is to use the Alternative Backup CLI command. It will perform a web request from the CLI.

It's far from optimal, but that should do the trick.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sabikeuk

Hello,

 

can you advise how to use the Alternative Backup CLI command ?

Regards,

Daniel

tampe125
Akeeba Staff

Simply get inside the Schedule Automatic Backups page, then scroll to the section "Alternative Command-Line CRON job", there you can find all the info.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
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!