Support

Akeeba Backup for Joomla!

#38308 Backup on Update

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
4.2.6
PHP version
8.0.26
Akeeba Backup version
n/a

Latest post by nicholas on Thursday, 12 January 2023 00:07 CST

SITech

Backup on update does not trigger when installing updates on either of my sites. The plugin is enabled. What else should I check?

nicholas
Akeeba Staff
Manager

Sorry for the "is it plugged in" question: we're talking about Joomla updates, right? I know it's self-understood but we've had some misunderstandings in the past with a few clients who mistakenly believed a backup kick in before extensions are updated.

First, make sure the plugin is published and its access is set to Public.

When you go to System, Update, Joomla you should see the plugin's banner at the top of the page:

screenshot_2023-01-11_at_08.55.56.png

Clicking that button disables the automatic backups and the banner changes accordingly, giving you a button to re-enable the automatic backups.

If you do not see that banner, edit the “System - Backup on update” plugin and make sure you've selected a backup profile, the plugin is published and its access set to Public.

If this doesn't help, install the latest version of Akeeba Backup Professional twice in a row, without removing it before or in between. This refreshes any files which may be missing and which could cause the problem you are reporting.

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!

SITech

There were 3 updates today with the usual recommendation to backup first. I forgot your plugin is Joomla updates only. I must be getting old. 

Perhaps a future version could have options backup before Joomla updates only, or before any update.

Thanks for your help.

nicholas
Akeeba Staff
Manager

Well, Akeeba Backup used to have backups before installing extension updates around 2010. Then Joomla 1.6 came out and made it virtually impossible to take an "extension-only" backup due to the way some data is interlinked with the #__assets table. This required taking a full backup.

If you have a small site a full site backup is not that bad. A few seconds to a couple of minutes at worst.

If you have a bigger site it may be several dozen minutes to several dozen hours.

See where this is going?

Most people figured out that they would follow one of two strategies:

  • Automated daily backups so that any updates installed can be rolled backup without much fanfare. Suitable for big sites.
  • Take a backup before installing updates. Suitable for small to medium sized sites and especially great fit for site integrators teaching their clients how not to break their sites.

This means that a plugin to do this automatically was not just pointless, it would be unwelcome in most cases — especially given the fact that if you have more than 2–3 updates you want to install them in small batches to avoid server timeouts. So, this feature was axed about a decade ago.

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!

SITech

Thanks for that background. Makes great sense when you put like that.

Documentation says "When this plugin is enabled it will "see" your attempt to update Joomla! and automatically launch" and "the ability to ensure that a backup is performed every time you update Joomla". Of course, that is completely accurate when read with technical precision. I wonder how many read it as I did, in the more general sense of the Joomla system as installed? I tend to think of updating extensions in the same way as updating core Joomla. 

Could adding two words to the documentation stop this misinterpretation, eg  "your attempt to update Joomla! (not extensions) and automatically launch"?

Thank you for the brilliant extensions you make.
David

nicholas
Akeeba Staff
Manager

We actually haven't had anyone get confused before.

Note that I wasn't going for technical accuracy, I was going for standard verbiage. Joomla's interface and its documentation (if you can find it, which is another issue, but I digress…) use the same wording. "Joomla update" is used exclusively to talk about updating Joomla itself, "extensions update" is used to talk about updating the installed third party extensions.

The technically accurate description would be that when you access a backend page with option=com_joomlaupdate and a task or view indicating the summary page of available updates, or the page immediately preceding the actual start of the update process, the plugin will use Joomla's system messages feature to display information about the Backup on Update feature. If you choose to use this feature, the system plugin will intercept the page access with option=com_joomlaupdate and information indicating a Joomla core update package has been complete and the Joomla Update component should start extracting the update package. The plugin will set a flag in the user session that it's taking a backup and redirect you to Akeeba Backup's backup page, with a special URL parameter to initiate the backup without user input. Upon successful completion of the backup you are redirected back to the option=com_joomlaupdate URL which extracts the Joomla core update package. Due to the presence of the user session flag the system plugin will not attempt to redirect you again to Akeeba Backup. From a user's perspective, in the vast majority of use cases it appears as though this plugin can "see" that you are updating Joomla and take a backup before the update is installed.

The technically accurate description gives you a peek at all the dragons which lie underneath a deceptively "simple" feature. I had never designed Joomla Update to support running backups before the update — it would've been an unfair advantage to my own software, completely unacceptable for a contribution to Joomla itself (even if it weren't, it would've been a major moral issue!), which is why when I contributed Joomla Update to Joomla 2.5.1 I removed the backup on update code from it. So, I had to follow a more indirect approach to implement the Backup on Update feature. Now you know the whole story behind this feature :) 

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!