Support

Site Restoration

#37421 restoring 3.10.10 backups after failed J4 upgrade results in database 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
7.4.3
CMS Type
Joomla!
CMS Version
3.10.10
Backup Tool Version
n/a
Kickstart version
n/a

Latest post by nicholas on Tuesday, 05 July 2022 02:24 CDT

maestroc

I had a site updated to where I thought it would be able to go to Joomla 4.  Ran a backup (actually two of them) and did the update.  It failed so I tried to roll back to the backups.  Once it restores the front end works but the back end shows random errors.  For example going to the Extensions>Manage screen reports 0 Class 'JFormFieldList' not found.

The Akeeba interface is all debug information including the system info screen.

Warning: Use of undefined constant AKEEBA_PRO - assumed 'AKEEBA_PRO' (this will throw an Error in a future version of PHP) in /home/sawstemp/public_html/mixingupdate/administrator/components/com_akeeba/akeeba.php on line 64

Akeeba Backup - An unhandled Exception has been detected
500 Class 'Joomla\Console\Application' not found

File <root>/libraries/src/Application/ConsoleApplication.php Line 39

 The content below this point is for developers and power users.

Joomla 3.10.10 – PHP 7.4.30 on Linux

The Extensions>Manage>Database screen shows 99 errors such as 

  • Database schema version (3.10.7-2022-03-18) does not match CMS version (4.1.3-2022-04-08).
  • Table 'bk82o_user_keys' should not have column 'invalid'. (From file 4.0.0-2018-03-05.sql.)
  • Table 'bk82o_extensions' should not have column 'system_data'. (From file 4.0.0-2018-03-05.sql.)
  • Table 'bk82o_extensions' does not have column 'changelogurl'. (From file 4.0.0-2018-03-05.sql.)
  • Table 'bk82o_updates' does not have column 'changelogurl'. (From file 4.0.0-2018-03-05.sql.)
  • Table 'bk82o_user_notes' has the wrong type or attributes for column 'modified_user_id' with type int unsigned. (From file 4.0.0-2018-07-19.sql.)
  • Table 'bk82o_finder_filters' has the wrong type or attributes for column 'created_by' with type int unsigned. (From file 4.0.0-2018-07-29.sql.)
  • Table 'bk82o_finder_filters' has the wrong type or attributes for column 'created_by_alias' with type varchar(255). (From file 4.0.0-2018-07-29.sql.)
  • Table 'bk82o_finder_filters' has the wrong type or attributes for column 'checked_out_time' with type datetime. (From file 4.0.0-2018-07-29.sql.)
  • Table 'bk82o_finder_links' has the wrong type or attributes for column 'route' with type varchar(400). (From file 4.0.0-2018-07-29.sql.)
  • Table 'bk82o_finder_links' has the wrong type or attributes for column 'language' with type CHAR(7). (From file 4.0.0-2018-07-29.sql.)
  • Table 'bk82o_finder_links' has the wrong type or attributes for column 'state' with type int. (From file 4.0.0-2018-07-29.sql.)
  • Table 'bk82o_finder_links' has the wrong type or attributes for column 'access' with type int. (From file 4.0.0-2018-07-29.sql.)
  • Table 'bk82o_finder_links' has the wrong type or attributes for column 'publish_start_date' with type datetime. (From file 4.0.0-2018-07-29.sql.)
  • Table 'bk82o_finder_links' has the wrong type or attributes for column 'publish_end_date' with type datetime. (From file 4.0.0-2018-07-29.sql.)
  • Table 'bk82o_finder_links' has the wrong type or attributes for column 'start_date' with type datetime. (From file 4.0.0-2018-07-29.sql.)
  • etc.

I tried restoring from both backups and both do the same thing.

Tried installing to empty folder and new clean database.  Same thing happened...

I had this same experience on another site that I had to restore after trying the J4 update.  What am I doing wrong?  Did I miss something?

Attached the log files of the two backup attempts.

 

nicholas
Akeeba Staff
Manager

> It failed so I tried to roll back to the backups

As per https://www.akeeba.com/documentation/akeeba-backup-joomla/restoring-backups.html#general-guidelines 

---

Do not try to overwrite one Joomla! version family with a different one. Overwriting a major version with another (e.g. restoring a backup taken on Joomla! 3.7 on top of a site running Joomla! 2.5 or vice versa) or between different minor versions (e.g. restoring a backup taken on Joomla! 3.7 on top of a site running Joomla! 3.6 or vice versa) will NOT work. Joomla! moves files around between minor and major versions. Since the backup does not delete files not present in the backup archive this will end up with Joomla! being "confused" and malfunctioning. In these cases you should delete the existing files and folders (except, perhaps, user generated content) before restoring the backup. You can safely restore a sub-minor (path-level) version on top of another. For example, you can safely restore a Joomla! 3.7.5 site on top of a Joomla! 3.7.3 site or vice versa.

---

I can also tell you that you can NOT possibly have the issues you reported when you restore the backup on a clean directory and clean database. I can tell you why:

> Warning: Use of undefined constant AKEEBA_PRO

This happens when you mix the plugins from Akeeba Backup 8 and Akeeba Backup 9. Akeeba Backup 8 uses the constant AKEEBA_PRO, Akeeba Backup 9 uses the constant AKEEBABACKUP_PRO. That's how I know you have mixed files.

> 500 Class 'Joomla\Console\Application' not found

This happens when you mix Joomla 3 and Joomla 4 files. The \Joomla\Console\Application class was introduced in Joomla 4.0, it did not exist in Joomla 3. The only way for a Joomla 3 site to start looking for it is to have tried to restore a Joomla 3 backup on top of a Joomla 4 site.

> Database schema version (3.10.7-2022-03-18) does not match CMS version (4.1.3-2022-04-08).

Here Joomla itself tells you that your Joomla database tables are on version 3.10.7 but the files are on version 4.1.3. So you definitely have restored Joomla 3 on top of Joomla 4.

 

Do not try to restore to a clean folder (that is to say: a subfolder of your site). Instead, you need to remove all files and folders of your site, drop all the database tables (the latter is normally not necessary but I am afraid that the DB tables are now in shambles so let's remove that problem) and then restore the Joomla 3 site.

As for the update, I recommend creating a subdomain, restore the Joomla 3 backup, update all extensions, disable all third party system and action log plugins (Akeeba plugins are safe; our Joomla 3 software is built knowing that you will upgrade to Joomla 4), perform the upgrade to Joomla 4, fix any problems, upgrade extensions, install and configure a new Joomla 4 compatible template, enable any third party system and actionlog plugins. When you have a working Joomla 4 site, back it up. Then remove the Joomla 3 site's files and database, restore the Joomla 4 backup and Bob's your uncle. This is pretty much the process we followed (with some automation involved) to upgrade our own site to Joomla 4.

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!