feat: Standalone restore script — separate file that scans for ZIPs (#107) #123

Merged
jmiller merged 1 commits from feat/standalone-restore-script into main 2026-06-23 16:21:34 +00:00
Owner

Summary

New MokoRestore mode that generates restore.php as a standalone file. Closes #107.

How it works

  • Standalone mode: restore.php is written as a separate file alongside the backup ZIP
  • The restore script scans its own directory for ZIP files and presents a list
  • User selects which ZIP to restore from (or auto-selects if only one exists)
  • Both files (backup ZIP + restore.php) are uploaded to remote storage

Profile options

include_mokorestore is now a dropdown:

  • None — no restore script
  • Wrapped — restore.php bundled inside backup ZIP (existing behavior)
  • Standalone — restore.php as separate file with ZIP scanner

Use case

SCP the backup to a remote server → open restore.php in browser → it finds the ZIP automatically → full restore wizard without needing to extract anything first.

Test Plan

  • Profile dropdown shows three options
  • Wrapped mode still works (backward compatible)
  • Standalone mode generates restore.php in backup dir
  • restore.php finds ZIP files when opened in browser
  • Remote upload sends both backup.zip and restore.php
  • Multiple ZIPs in directory: radio buttons to choose
## Summary New MokoRestore mode that generates `restore.php` as a standalone file. Closes #107. ### How it works - **Standalone mode**: `restore.php` is written as a separate file alongside the backup ZIP - The restore script **scans its own directory** for ZIP files and presents a list - User selects which ZIP to restore from (or auto-selects if only one exists) - Both files (backup ZIP + restore.php) are uploaded to remote storage ### Profile options `include_mokorestore` is now a dropdown: - **None** — no restore script - **Wrapped** — restore.php bundled inside backup ZIP (existing behavior) - **Standalone** — restore.php as separate file with ZIP scanner ### Use case SCP the backup to a remote server → open restore.php in browser → it finds the ZIP automatically → full restore wizard without needing to extract anything first. ## Test Plan - [ ] Profile dropdown shows three options - [ ] Wrapped mode still works (backward compatible) - [ ] Standalone mode generates restore.php in backup dir - [ ] restore.php finds ZIP files when opened in browser - [ ] Remote upload sends both backup.zip and restore.php - [ ] Multiple ZIPs in directory: radio buttons to choose
jmiller added the component: enginecomponent: remote labels 2026-06-23 16:20:54 +00:00
jmiller added 1 commit 2026-06-23 16:20:55 +00:00
feat: standalone restore script — separate file that scans for ZIPs (#107)
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Blocked by required conditions
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Blocked by required conditions
Joomla: Extension CI / PHPStan Analysis (pull_request) Blocked by required conditions
Joomla: Extension CI / Build RC Pre-Release (pull_request) Blocked by required conditions
Universal: PR Check / Build RC Package (pull_request) Blocked by required conditions
Universal: PR Check / Report Issues (pull_request) Blocked by required conditions
Generic: Repo Health / Scripts governance (pull_request) Blocked by required conditions
Generic: Repo Health / Repository health (pull_request) Blocked by required conditions
Generic: Repo Health / Report Issues (pull_request) Blocked by required conditions
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 7s
Universal: PR Check / Branch Policy (pull_request) Failing after 3s
Universal: PR Check / Secret Scan (pull_request) Successful in 9s
Universal: PR Check / Validate PR (pull_request) Failing after 7s
Generic: Repo Health / Access control (pull_request) Successful in 3s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 16s
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 53s
Universal: Build & Release / Build & Release Pipeline (pull_request) Successful in 31s
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Failing after 8m41s
e62dba8f40
New MokoRestore mode: 'standalone' generates restore.php as a separate
file that scans its directory for ZIP backup archives and lets the user
choose which one to restore. Unlike 'wrapped' mode which bundles
restore.php inside the backup ZIP, standalone mode keeps both files
separate — ideal for remote servers where you SCP the backup.

Changes:
- MokoRestore::generateStandalone() — writes restore.php with ZIP scanner
- Profile form: include_mokorestore now a dropdown (none/wrapped/standalone)
- BackupEngine: standalone mode writes restore.php + uploads to remote
- Restore script uses safe DOM methods (no innerHTML with user data)

Closes #107
jmiller merged commit f55b032cc9 into main 2026-06-23 16:21:34 +00:00
jmiller deleted branch feat/standalone-restore-script 2026-06-23 16:21:36 +00:00
Sign in to join this conversation.
No Reviewers
Priority -
Type -
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoSuiteBackup#123