feat: Scheduled snapshots, restore notifications, stepped restore (#56, #60, #62) #91

Merged
jmiller merged 3 commits from feat/batch-56-60-62 into main 2026-06-22 14:28:02 +00:00
Owner

Summary

Three features. Closes #56, closes #60, closes #62.

#56: Scheduled snapshot task

  • mokosuitebackup.snapshot task type for com_scheduler
  • Parameters: content_types (checkboxes), description_format (with [date]/[datetime] placeholders)
  • New form: forms/run_snapshot.xml

#60: Restore notifications

  • NotificationSender::sendRestoreNotification() for site_restore, snapshot_create, snapshot_restore
  • getDefaultProfile() helper to load notification settings
  • All calls in try-catch — notification failure never breaks operations
  • Integrated into RestoreEngine, SnapshotEngine, SnapshotRestoreEngine

#62: Stepped restore engine (largest feature)

  • SteppedRestoreEngine with 6 phases: extract → files → database → config → cleanup → complete
  • Files in batches of 200, SQL in batches of 500
  • AjaxController::restoreInit() and restoreStep() endpoints
  • Restore modal uses AJAX progress with red progress bar
  • Separate .restore.json for restore-specific state
  • Path traversal protection, JPA/tar.gz/ZIP format detection

Test Plan

  • Create scheduled snapshot task in System → Scheduled Tasks
  • Scheduled snapshot runs and creates snapshot record
  • Site restore triggers email/ntfy notification
  • Snapshot create triggers notification
  • AJAX restore: select backup → restore modal → progress bar → completes
  • AJAX restore with large DB: verify batched SQL import
  • AJAX restore: cancel mid-restore, verify staging cleaned up
## Summary Three features. Closes #56, closes #60, closes #62. ### #56: Scheduled snapshot task - `mokosuitebackup.snapshot` task type for com_scheduler - Parameters: content_types (checkboxes), description_format (with [date]/[datetime] placeholders) - New form: `forms/run_snapshot.xml` ### #60: Restore notifications - `NotificationSender::sendRestoreNotification()` for site_restore, snapshot_create, snapshot_restore - `getDefaultProfile()` helper to load notification settings - All calls in try-catch — notification failure never breaks operations - Integrated into RestoreEngine, SnapshotEngine, SnapshotRestoreEngine ### #62: Stepped restore engine (largest feature) - `SteppedRestoreEngine` with 6 phases: extract → files → database → config → cleanup → complete - Files in batches of 200, SQL in batches of 500 - `AjaxController::restoreInit()` and `restoreStep()` endpoints - Restore modal uses AJAX progress with red progress bar - Separate `.restore.json` for restore-specific state - Path traversal protection, JPA/tar.gz/ZIP format detection ## Test Plan - [ ] Create scheduled snapshot task in System → Scheduled Tasks - [ ] Scheduled snapshot runs and creates snapshot record - [ ] Site restore triggers email/ntfy notification - [ ] Snapshot create triggers notification - [ ] AJAX restore: select backup → restore modal → progress bar → completes - [ ] AJAX restore with large DB: verify batched SQL import - [ ] AJAX restore: cancel mid-restore, verify staging cleaned up
jmiller added the component: enginecomponent: admincomponent: scheduler labels 2026-06-22 14:27:34 +00:00
jmiller added 3 commits 2026-06-22 14:27:34 +00:00
Add mokosuitebackup.snapshot task type for com_scheduler with params
for content_types and description_format ([date]/[datetime] placeholders).

Closes #56
Send notifications when site restores and snapshot create/restore
complete. Uses sendRestoreNotification() with type-specific subjects.
All calls wrapped in try-catch to never break the actual operation.

Closes #60
feat: AJAX stepped restore engine for large sites (#62)
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
Universal: PR Check / Branch Policy (pull_request) Failing after 1s
Generic: Repo Health / Access control (pull_request) Successful in 2s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 5s
Universal: PR Check / Validate PR (pull_request) Failing after 5s
Universal: PR Check / Secret Scan (pull_request) Successful in 6s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 9s
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 32s
Branch Cleanup / Delete merged branch (pull_request) Successful in 3s
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Failing after 6s
Universal: Build & Release / Build & Release Pipeline (pull_request) Successful in 23s
01bed8942c
Break restore into phases (extract, files, database, config, cleanup)
executed via AJAX steps to avoid PHP timeout on shared hosting.

- SteppedRestoreEngine with session persistence
- AjaxController restoreInit/restoreStep endpoints
- Restore modal uses AJAX progress instead of synchronous submit
- Files copied in batches of 200, SQL in batches of 500

Closes #62
jmiller merged commit 6d47b70aaf into main 2026-06-22 14:28:02 +00:00
jmiller deleted branch feat/batch-56-60-62 2026-06-22 14:28:07 +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#91