Support

Akeeba Backup for Joomla!

#21323 Functions/View in MySql

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 nicholas on Thursday, 30 October 2014 08:34 CDT

Brauneck
EXTREMELY IMPORTANT: Please attach a ZIP file containing your Akeeba Backup log file in order for us to help you with any backup or restoration issue. If the file is over 2Mb, please upload it on your server and post a link to it.

Description of my issue:
Hi Nicolas,
my ticket may be related to #16086. I am using kickstart pro 4.0.0

I try to restore a Joomla installation that has a custom extension (component) using MySql views and a single MySql function. Some views are using this function.

Restoration fails IMO because the function must be restored before the views. When kickstart aborts, the function has not been created yet, while kickstart/alice tries to create the view.

I am quite sure that kickstart will not look for dependencies on views and functions at the moment (does it?), so the best way in my opinion would be to restore all functions before and the view afterwards.

For my special problem, I will create the function manually on the database and than let the database restoration run again.

Generally spoken, MySql functions may depend on otherones (but not in a circular way), so more complex function restoration will cause some implementation effort in kickstart/alice, because there will be the need to analyze the dependencies to determine a restoration order.

Best regards,
Stefan

nicholas
Akeeba Staff
Manager
Kickstart only extracts the archive. Please run Kickstart and read the 9 points which are displayed in the popup.

The restoration script will only execute the commands stored in the database dump files (installation/sql/joomla.sql, .s01, .s02, ...) in the order they were written to those files. These files were written at backup time.

Akeeba Backup has the ability to perform database entity dependency checks, BUT:
  • Circular references cannot be resolved and will lead to a necessarily broken state
  • You may have disabled the dependency checks in Components, Akeeba Backup, Configuration, Database backup engine, Configure, No dependency tracking


So, you have to check the configuration of Akeeba Backup. Have you disabled dependency tracking? If not, you have circular references. Please note that a circular reference is NOT ONLY the case where table A references table B which references table A. You also have a circular reference when table A references table B references table C references table D references table A. In this case there is no way to know if there is a correct order in restoring tables A, B, C, D. Moreover, things get even more complicated when View A depends on a Function B and Table C but function B also depends on table C and table D but table D depends on table C. You get the idea. Any circular reference will cause restoration problems. Even mysqldump can't help you with circular references (hell, it doesn't even do simple dependency tracking!) and it's written by the same people who wrote MySQL itself...

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!

Brauneck
Hi Nicholas,

At the moment, I am not even sure if MySql can handle circular dependencies at all. So there is no need to go deeper into this issue.

In the meantime, I have updated Akeeba to 4.0.5 Pro. Your tip to examine the configuration of the database backup engine was golden. By default, no triggers, procedures and function are stored. I have checked the box now. Would it be possible to set this behavior to true in future releases?

Best regards,
Stefan

nicholas
Akeeba Staff
Manager
Hello Stefan,

Unfortunately we can't enable this by default. This feature depends on your database user being able to list this kind of advanced database entities (procedures, functions and triggers). The vast majority of our users is hosted on limited shared hosts which don't give this kind of access and they don't use advanced entities anyway – even if they wanted to they would not be able to due to the aforementioned restrictions.

When we first introduced this feature we had it enabled by default. Unfortunately this brought a barrage of support requests and bug reports from these people who perceived Akeeba Backup as being broken. Since these are the vast majority of our users and clients we had no option but to add a switch to enable this feature and have it disabled by default.

I hope this information helps.

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!