Update Joomla and your extensions without holding your breath. MokoSuiteBackup takes a fresh, full-screen backup before any core update, install, update or uninstall — on its own page with a real progress bar, never synchronously inside the update request — then hands control back so the action continues. If the backup fails, the action is blocked.
Overview
MokoSuiteBackup can automatically run a full-screen backup before Joomla changes anything — before a Joomla core update, before an extension install, before an extension update, and before an extension uninstall. The backup runs on its own dedicated full-page screen, shows a real progress bar, and then hands control back to Joomla so the original action continues.
The design goal is safety without white-screens: no backup ever runs synchronously inside the core update request. Running a large-site backup inside the update request is exactly what white-screened sites in earlier approaches, so the core-update flow always redirects to the standalone backup screen first.
These pre-action backups are gated on the execution-tuning wizard. While the wizard is pending (MokoSuiteBackup flags it after an install so it can measure the host's real limits), the pre-update, pre-install and pre-uninstall backups do not run — and a skipped pre-action backup is never silent: MokoSuiteBackup raises an admin warning and writes a mokosuitebackup log entry stating that the action continued without a backup. Note: with the wizard pending, updates and installs proceed unprotected until it is run. Running the execution-tuning wizard (in Components > MokoSuiteBackup > Options) restores these backups.
Pre-Install Backup (with Opt-Out)
In addition to the pre-update backup, MokoSuiteBackup can take a backup before an extension install, giving you a fresh restore point in case a new extension damages the site. Because installs are routine, the pre-install backup is presented as an opt-out checkbox on the Install screen (System > Install > Extensions): the “back up before installing” checkbox is offered right where you upload the package, and you can untick it to skip the backup for that install. This sits alongside the existing pre-update and pre-uninstall opt-outs and uses the same full-screen backup flow.
While the execution-tuning wizard is pending, the pre-update, pre-install and pre-uninstall opt-out checkboxes are suppressed — you can't disable a pre-action backup or run a manual one until the wizard has been run.
Turning It On
Configure under Components > MokoSuiteBackup > Options > Pre-Action:
| Option | Param | Default | Covers |
|---|---|---|---|
| Backup before update | backup_before_update | No | Joomla core updates and extension updates |
| Backup before install | backup_before_install | No | Extension installs (with a per-install opt-out checkbox on the Install screen) |
| Backup before uninstall | backup_before_uninstall | No | Extension uninstalls (Extensions > Manage) |
The backup runs with the component's default profile (default_profile, defaults to profile 1). These features are Super User only — a non-super-user updating or installing an extension is never intercepted. Pre-update is owned by the System plugin via the component options above; there is no separate per-plugin “before update” toggle.
One Backup Per Update Action
A pre-action backup fires once per Install/Update/Uninstall action, not on a timer. A per-request dedupe guard means a batch update backs up only once, and a one-shot skip flag prevents the client-side and server-side paths from duplicating each other — while the next distinct action still backs up again. The core-update path uses its own session key so it never suppresses extension backups.
How It Works — Joomla Core Updates
For a core update the plugin intercepts server-side (in onAfterRoute) at the last moment before any files change:
- The Install the update click is matched on the confirm/updating page.
- The browser is redirected to the full-screen backup screen (
view=runbackup) with a validatedreturnurlback to the update page. - The backup runs on its own page.
- On return, a small injected script auto-ticks Joomla's "I have taken a backup" checkbox and clicks Install, so the update continues automatically instead of stopping for a second manual click.
How It Works — Extension Installs / Updates / Uninstalls
Extension install/update/uninstall are POST actions carrying a CSRF token and (for update/uninstall) a checked selection, so this path is handled client-side by the plugin's installer-backup.js, injected on Extensions > Install, Extensions > Update and Extensions > Manage. In Joomla 6 the toolbar buttons are web components, so the script uses a capture-phase click listener that runs before the toolbar's own handler:
- Intercept the Install/Update/Uninstall action and, for update/uninstall, capture the checked selection into
sessionStorage. - Send the browser to the full-screen backup screen with a validated
returnurl. - The backup runs, then returns to the original page.
- Resume — the script restores the selection and re-fires the action so the real POST proceeds. In Joomla 6 the click handler is bound to the inner button (not the outer
taskwrapper), and a list-selection button starts disabled untilboxcheckedfires a change event — the script handles both so the action actually submits. While the action runs, a full-screen “now running — please wait” overlay is shown so you know it is working. The overlay leads with a prominent amber warning triangle above the spinner, reinforcing “do not close this window until the update finishes”.
A server-side fallback still exists for the extension path; when it runs synchronously it raises PHP limits and sets ignore_user_abort(true) so a large-site backup can't exhaust the request. If the client-side redirect can't be built, the script bails without preventing the click, so Joomla's own action proceeds normally.
The Full-Screen Backup Screen
view=runbackup is the shared full-page screen used by both the pre-action flow and the dashboard Backup Now:
- Auto-starts the stepped backup over AJAX with a full-bleed, Atum-coloured progress bar on a black backdrop.
- While the backup runs it shows a prominent “do not close this window or switch to another window” warning and a Cancel button. Cancelling requires a double confirmation; on confirm it stops the backup, cancels the record, and returns to the dashboard without continuing any pending action.
- The
returnurlis validated to block open-redirect /javascript:XSS — only a same-host absolute URL or a root-relative path is accepted. - Pre-action flow: the screen shows an “Automatically continue when the backup finishes” checkbox, ticked by default. Checked → hands straight back to Joomla and the action continues seamlessly; unticked → stops on a completion panel with a View backup record link (opens in a new window) and a Continue button.
- Manual Backup Now: shows a View backup record button and Back to dashboard.
- On failure the action is blocked. The pre-action screen offers only Retry or Back to dashboard — never “continue without backup” — so a broken backup can never let the install/update proceed unprotected.
Notifications
Every pre-action backup surfaces its outcome in the admin as an enqueued message — success, warning, or failure — so a successful pre-action backup is visible, not just failures. A pre-action backup that did not run at all (the tuning wizard is pending, a preflight check failed, the profile is missing, or the run threw) is announced just as loudly: an admin warning plus a mokosuitebackup log entry stating the action continued without a backup.