Support

Site Restoration

#39980 DB restoration errors

Posted in ‘Site restoration’
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

PHP version
8.2
CMS Type
Joomla!
CMS Version
3.10.9
Backup Tool Version
n/a
Kickstart version
8.0.3

Latest post by nicholas on Friday, 15 December 2023 00:41 CST

bob.clinton

Moving this site off an AWS server running PHP 7.3 to a server running PHP 8.2. 

  • MYSQLi  shows a warning (mysqliwarning.jpg).
  • Variable was set on the server to 67108864 (mysqpacket.jpg).
  • Immediate error (mysqlierror.jpg) 

Tried using MYSQL (PDO Driver).

  • Forced UTF 8 got error (mysqlerror.jpg).

I'm at a loss how to fix this.  

 

 

nicholas
Akeeba Staff
Manager

The new server does not support the utf8mb4_0900_ai_ci collation. This collation was added to MySQL 8.0.

If your new host is running a MySQL version earlier than 8.0 they need to update it; older versions are no longer developed or supported.

If they are using MariaDB please let me know. MariaDB has unfortunately not added support for this collation, therefore we'll have to work around it. Before we start doing that, I need to make sure this is the case.

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!

bob.clinton

The server is indeed running...

 

 MariaDB Database Server
MariaDB version 11.1.3

 

bob.clinton

Original site had hundreds of thousands of Admin Tools Blocked entries. I uninstalled Admin Tools and reran the backup. Got to about 80% until it threw ErrNo #1273. See attached screen grab.

nicholas
Akeeba Staff
Manager

Okay, now it all makes sense. MariaDB is a weird combination, where its version is higher than MySQL's, but does not implement the same features.

First, extract your backup archive using Kickstart.

AFTER extracting the backup archive and BEFORE clicking on the button to run the installer extract the following files to your site:

These replace files in the installation directory where the restoration script (ANGIE) was extracted to.

Now you can proceed with the rest of the installation.

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!

bob.clinton

I see two Dropbox archives. 

angie.zip & angie-joomla.zip

Do I upload and extract both?

nicholas
Akeeba Staff
Manager

Correct.

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!

bob.clinton

Got the same error. It appears to be related to a specific table "kn19m_finder_types". see attached mysqlierror3.jpg

Incidentally, I was able to install two other Joomla sites on this server without error. 

bob.clinton

Hi Nicholas -

I was able to finally install the site on the new server. I had to selectively eliminate finder DB tables. Backing up now and will be upgrading to Joomla 5. 

Thanks for your attention and support. 

 

Robert Clinton
Owner

CAPE COD WEB DEVELOPERS

nicholas
Akeeba Staff
Manager

The actual problem, so that you know, is that your database server lies about its type and version.

The Akeeba Backup restoration script (ANGIE) has had code to convert the utf8mb4_0900_ai_ci collation to utf8mb4_unicode_520_ci when it detects a database server version lower than 8.0. This code has been there since Akeeba Backup 7.2.2 (released July 13th, 2020). It's the changelog entry “Automatic UTF8MB4 character encoding downgrades from MySQL 8 to 5.7/5.6/5.5 on restoration”.

This all worked on MariaDB, because MariaDB reported its version with the prefix 5.5.5-MariaDB. Since the detected version in this case is 5.5.5, which is lower than 8.0, the aforementioned code kicked in and converted the collation.

At some point, I believe around MariaDB 10.4, MariaDB stopped reporting its version in this way. Now it reports it as something like 10.4.32-MariaDB-…. The detected version is 10.x which is higher than 8.x, therefore the code does not apply anymore. Why this only became an issue with MariaDB now is pretty simple. MariaDB 10.3 (the previous Long Term Support version) became End of Life a couple of months ago, therefore hosts started upgrading to newer versions of MariaDB.

The changes I made in the files I sent you specifically check for the MariaDB string in the server version. When they detect it, they immediately apply the “this is not MySQL 8 or later” code I mentioned above, changing the collation. I confirmed it by running MariaDB 10.4 on Docker, doing a restoration there. I can see that the collation of the tables and columns which was set to utf8mb4_0900_ai_ci on the original server are not converted to utf8mb4_unicode_520_ci as they should.

The fact that your server does not work with that tells me that either you didn't extract the files after extracting the backup archive (which means that my changes got overridden by the older code in your backup archive) OR your server reports a misleading database server version. Since you've asked me explicitly if you are to extract both file I assume it's not the former, therefore it can only be the latter.

If by any chance you made a mistake, extracting the files I sent you before extracting the backup archive, there's your problem.

As a final note: this issue will be fixed in a new release of Akeeba Backup 9 for Joomla! 4 and 5, but not in Akeeba Backup 8 which as we have already stated is out of regular support. We won't make bug fix releases to Akeeba Backup 8, only security releases.

If you have a Joomla! 3 backup affected by this issue, there's a simple workaround. After extracting the backup archive and BEFORE clicking on Run the Installer button edit the file installation/framework/database/restore/mysqli.php and change the line

static $MySQL8 = null;

to

static $MySQL8 = false;

This will fix the problem with the collation.

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!