Support

Akeeba Backup for Joomla!

#43173 Problems with views

Posted in ‘Akeeba Backup for Joomla!’
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
5.4.7
PHP version
9.4
Akeeba Backup version
10.3.6

Latest post by nicholas on Monday, 03 August 2026 08:18 CDT

[email protected]
I've encountered a major problem.
I'm trying to restore a backup, but during the restore process, I get a "table does not exist" error when creating a view. Upon further investigation, I noticed that the file containing the view, in the export, is named site.s140, while the table creation is in the site.s202 file.
Perhaps this explains why it's not finding the table when creating the view. Is it perhaps creating the view before the table?
Can you explain how to proceed?
Thanks, Nathan

nicholas
Akeeba Staff
Manager

In the Database Restoration page set "With existing tables" to "Backup" and "Stop On Create Error" to No (grey).

These problems normally only happen when there are circular table references, when the referenced tables' names are substrings of other backed up tables, or the view definition has nested subqueries which cannot be analyzed correctly by the SQL lexer/parser. It's also possible you used an older version to take the backup; older versions allowed you to disable the table/view dependency analyzer which could lead to this chicken and egg problem.

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]
I did as suggested, but the only result was that the views weren't created.
Now, allow me to point out that the problem doesn't seem complicated to me. It's not a chicken-or-egg problem.
The views are a consequence of the tables. So, your procedure should first restore the tables and then launch the view creation process. Nothing complicated, and the problem is solved.
So, how can I proceed?
Furthermore, the recovery should be automated in the future, and with this obvious error, it seems impossible for me.

I await your response.

Best regards.
Nathan

nicholas
Akeeba Staff
Manager

I told you that Akeeba Backup 10.3.6 is already doing dependency graph analysis. See \Akeeba\Engine\Dump\Native\Mysql::getTablesToBackup(). As you can see, views are added as dependency graph entities using \Akeeba\Engine\Dump\Native\MySQL\ListEntitiesTrait::getTablesViewCollection(). The entire dependency graph is resolved using \Akeeba\Engine\Dump\Dependencies\Resolver.

This will fail if there are circular references. When A depends on B, B depends on C, and C depends on A there is no resolution to the dependency graph. You will end up with an unresolved dependency which might fail at restoration time.

It will also fail if INFORMATION_SCHEMA does not return accurate information about your dependencies. See \Akeeba\Engine\Dump\Native\MySQL\ListEntitiesTrait::resolveDependencies. In your case, if the VIEW_TABLE_USAGE view does not return all dependent tables as TABLE_NAME columns we cannot possibly know there is a table dependency for that view. 

If accessing INFORMATION_SCHEMA is not possible at all, we fall back to an alternate view dependency analyzer, see \Akeeba\Engine\Dump\Native\MySQL\ListEntitiesTrait::getViewDependencies. This uses a third party SQL lexer/parser library (greenlion/php-sql-parser). However, this parser can and will be confused with some syntax that valid MySQL but not well supported in it. Again, this will only happen if your database server is thoroughly broken, refusing access to a feature that's supposed to be a given.

If you have excluded tables but not the views that depend on them you are creating a broken backup. You want us to restore views which depend on tables you do not include in the backup. This is not prevented because there's a valid use case: partial backups; restoring them does indeed assume the tables missing from the backup do exist on the target server you are restoring to.

In older versions of Akeeba Backup you could also disable dependency tracking. This was removed long before 10.3.6, the version you are claiming to be using. If you actually took the backup with an older version of Akeeba Backup you may have indeed disabled dependency tracking, scoring a self-inflicted issue.

If any of these issues WHICH ACTUALLY HAVE NOTHING TO DO WITH ME AND MY CODE have occurred, the dependency resolution fails. In this case, you get a database dump, probably not in the “right” order. This will create a chicken and egg issue with the views. The root cause is either a server issue I cannot reasonably defend against, or a misconfiguration on your part I can definitely not defend against in any sensible way. You need to investigate what happened on your end.

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!