Remove legacy single-remote storage in favor of remotes table #204

Merged
jmiller merged 6 commits from fix/remote-storage-cleanup into main 2026-07-04 20:36:32 +00:00
Owner

Summary

Drops the legacy single-remote-storage feature (the per-profile remote_storage column plus all FTP/SFTP/S3/Google-Drive credential columns) in favor of the existing multi-remote #__mokosuitebackup_remotes table, which is created at install time.

  • SQL: drop 26 legacy columns (install.mysql.sql + 02.52.25.sql migration).
  • Forms/UI: remove legacy remote fields and the ftp/google_drive/s3 fieldsets from profile.xml; drop the legacy UI in tmpl/profile/edit.php (adds a "save first" prompt, uses getOrCreateInstance for the modal, reads item.params).
  • Engines: remove the backward-compat fallback branches in BackupEngine, SteppedBackupEngine, and loadRemoteDestinations() (the remotes table is guaranteed by install).
  • PreflightCheck: validate credentials from the remotes table; the curl warning now applies to ntfy only.
  • SteppedSession: drop the remoteStorage property.
  • script.php: simplify the postflight license-key prompt (fixed a fatal try-without-catch introduced mid-edit before commit).

Notes

  • Safe because #__mokosuitebackup_remotes is created in install.mysql.sql, so fresh installs and migrated sites both have it.
  • services/provider.php deletion, submodule bump, and module <name> rename were intentionally left out of this branch.

Test plan

  • Fresh install → profile editor Remote tab shows only multi-remote destinations.
  • Existing profiles with legacy remotes: migration drops the old columns cleanly.
  • Run a backup with a configured remote destination → uploads succeed.
## Summary Drops the legacy single-remote-storage feature (the per-profile `remote_storage` column plus all FTP/SFTP/S3/Google-Drive credential columns) in favor of the existing multi-remote `#__mokosuitebackup_remotes` table, which is created at install time. - **SQL**: drop 26 legacy columns (`install.mysql.sql` + `02.52.25.sql` migration). - **Forms/UI**: remove legacy remote fields and the `ftp`/`google_drive`/`s3` fieldsets from `profile.xml`; drop the legacy UI in `tmpl/profile/edit.php` (adds a "save first" prompt, uses `getOrCreateInstance` for the modal, reads `item.params`). - **Engines**: remove the backward-compat fallback branches in `BackupEngine`, `SteppedBackupEngine`, and `loadRemoteDestinations()` (the remotes table is guaranteed by install). - **PreflightCheck**: validate credentials from the remotes table; the curl warning now applies to ntfy only. - **SteppedSession**: drop the `remoteStorage` property. - **script.php**: simplify the postflight license-key prompt (fixed a fatal `try`-without-`catch` introduced mid-edit before commit). ## Notes - Safe because `#__mokosuitebackup_remotes` is created in `install.mysql.sql`, so fresh installs and migrated sites both have it. - `services/provider.php` deletion, submodule bump, and module `<name>` rename were intentionally **left out** of this branch. ## Test plan - [ ] Fresh install → profile editor Remote tab shows only multi-remote destinations. - [ ] Existing profiles with legacy remotes: migration drops the old columns cleanly. - [ ] Run a backup with a configured remote destination → uploads succeed.
jmiller added 2 commits 2026-07-04 19:36:52 +00:00
refactor(remote): remove legacy single-remote storage in favor of remotes table
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 25s
68605ffc05
Drops the per-profile remote_storage column and all legacy FTP/SFTP/S3/
Google Drive credential columns. Remote destinations are now sourced
exclusively from #__mokosuitebackup_remotes (multi-remote), which is
created at install time — so the backward-compat fallback branches in
BackupEngine, SteppedBackupEngine and loadRemoteDestinations are removed.

- sql: drop 26 legacy columns (install.mysql.sql + 02.52.25.sql migration)
- forms/profile.xml: remove legacy remote fields and ftp/gdrive/s3 fieldsets
- tmpl/profile/edit.php: drop legacy UI, add save-first prompt, use
  getOrCreateInstance for the modal, read item.params (was item.config)
- PreflightCheck: validate credentials from the remotes table; curl
  warning now applies to ntfy only
- SteppedSession: drop remoteStorage property
- language: add backup-record delete-count strings
- script.php: simplify postflight license-key prompt
jmiller added 1 commit 2026-07-04 20:17:58 +00:00
fix(remote-cleanup): resolve dropped-column references found in review
Universal: PR Check / Branch Policy (pull_request) Failing after 1s
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 6s
Universal: PR Check / Validate PR (pull_request) Failing after 6s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Generic: Repo Health / Access control (pull_request) Successful in 2s
Universal: PR Check / Secret Scan (pull_request) Successful in 10s
Generic: Project CI / Lint & Validate (pull_request) Successful in 13s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 27s
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been skipped
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 40s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 41s
Generic: Project CI / Tests (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report: Scripts Governance (pull_request) Has been cancelled
Generic: Repo Health / Report: Repository Health (pull_request) Has been cancelled
46daabc34f
Follow-up to the legacy remote-storage removal — three consumers still
referenced columns this branch drops:

- 02.52.25.sql: use plain DROP COLUMN instead of DROP COLUMN IF EXISTS.
  IF EXISTS on DROP COLUMN is a MariaDB-only extension and errors on
  Oracle MySQL 8.x (which Joomla also supports); the columns always exist
  here, so the guard is unnecessary and the migration is now portable.
- AkeebaImporter::mapToMokoProfile(): stop inserting the 19 dropped
  remote_storage/ftp_*/gdrive_*/s3_* columns (would fatal with "Unknown
  column" on Akeeba import). Remote settings now live in the remotes
  table and are re-added on the profile Remote tab after import.
- AjaxController::browseSftpDir() + SftpPathField: remove. These were the
  legacy single-SFTP path picker, orphaned when the SftpPath form field
  was removed; they read now-dropped sftp_* columns.

Claude-Session: https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i
jmiller added 1 commit 2026-07-04 20:18:24 +00:00
jmiller added 2 commits 2026-07-04 20:36:22 +00:00
# Conflicts:
#	SECURITY.md
#	source/packages/MokoSuiteClient
#	source/packages/com_mokosuitebackup/mokosuitebackup.xml
#	source/packages/mod_mokosuitebackup_cpanel/mod_mokosuitebackup_cpanel.xml
#	source/packages/plg_actionlog_mokosuitebackup/mokosuitebackup.xml
#	source/packages/plg_console_mokosuitebackup/mokosuitebackup.xml
#	source/packages/plg_content_mokosuitebackup/mokosuitebackup.xml
#	source/packages/plg_quickicon_mokosuitebackup/mokosuitebackup.xml
#	source/packages/plg_system_mokosuitebackup/mokosuitebackup.xml
#	source/packages/plg_task_mokosuitebackup/mokosuitebackup.xml
#	source/packages/plg_webservices_mokosuitebackup/mokosuitebackup.xml
#	source/pkg_mokosuitebackup.xml
#	source/script.php
Merge CI version bump (superseded by main's 02.55.00)
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 7s
Universal: PR Check / Secret Scan (pull_request) Successful in 12s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 41s
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Generic: Repo Health / Access control (pull_request) Successful in 3s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 3s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Generic: Project CI / Lint & Validate (pull_request) Successful in 1m11s
Universal: PR Check / Validate PR (pull_request) Failing after 1m5s
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 1m14s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 1m8s
Universal: Build & Release / Build & Release Pipeline (pull_request) Successful in 41s
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Successful in 8m24s
Generic: Project CI / Tests (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report: Scripts Governance (pull_request) Has been cancelled
Generic: Repo Health / Report: Repository Health (pull_request) Has been cancelled
6f7dc6766d
jmiller merged commit f0fa645e51 into main 2026-07-04 20:36:32 +00:00
jmiller deleted branch fix/remote-storage-cleanup 2026-07-04 20:36:37 +00:00
Sign in to join this conversation.