Support

Akeeba Backup for Joomla!

#33601 Losing DB Triggers And Occasionally Auto Increments On 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
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by on Wednesday, 30 September 2020 01:17 CDT

mba90006

Please look at the bottom of this page (under Support Policy Summary) for our support policy summary, containing important information regarding our working hours and our support policy. Thank you!

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...

It seems that when I backup my site...the database triggers are never kept.  Also, occasionally one or two database tables will lose the auto-increment property on their primary key.  This happens at random and I the only time I find out is when I try to do an insert to the table which results in an error. Both issues are not "catastrophic"...they're just annoying. I saw a few previously posted tickets regarding DB triggers however I could not open them for some reason. Anyway...if you can shed some light on how I can fix these issues, that would be awesome. Also, I did check the database table exclusion tab in Akeeba Backup...and I didn't see any triggers excluded.

Thanks in advance!

 

nicholas
Akeeba Staff
Manager

Akeeba Backup will back up PROCEDUREs, FUNCTIONs and TRIGGERs by default. I added this code ten years ago :)

But it is an option which can be turned off. Before going on a wild goose chase go to Akeeba Backup, select your backup profile, click on Configuration and find the Database Backup Engine row. Click on the Configure button next to it. In the pane which opens below make sure that “Dump PROCEDUREs, FUNCTIONs and TRIGGERs” is checked.

If this is already checked, it may be that MySQL itself doesn't allow you to either dump OR restore the triggers. Each trigger has a definer which is a MySQL user. If the definer is different than the MySQL user your site runs under MySQL will refuse to let it dump its definition. Also note that the MySQL user your site runs under must have the TRIGGER privilege granted to it. Otherwise MySQL will refuse to create, drop, execute, or display triggers for that table per the MySQL documentation page I linked you to.

Likewise, creating triggers also requires the TRIGGER privilege. Moreover, the privilege must remain granted for the trigger to function when making table operations per MySQL's documentation.

As for auto increments, they are definitely backed up and restored. They are part of the table's DDL. MySQL includes it when we are showing the create command of the table and executing it is a non-privileged operation. This has been present in Akeeba Backup since it was first released as JoomlaPack all the way back in 2006. I believe that on the tables where you have a problem you don't have an auto increment column but are instead relying on a trigger.

 

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!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

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!