fix: mark backup as warning when remote upload fails #178

Open
jmiller wants to merge 2 commits from fix/remote-upload-failure-status into main
Owner

Summary

  • Adds warning status for backups where the archive was created successfully but remote upload failed (SFTP, FTP, S3, Google Drive)
  • Adds status_message column to #__mokosuitebackup_records storing the specific failure reason — visible in the list and detail views without digging through the full log
  • Both BackupEngine and SteppedBackupEngine now set status = 'warning' and record the error details from each failed remote destination
  • Warning-status backups are included in dashboard stats, retention cleanup, and archive browser/download actions (the local archive is valid)

Changes

  • BackupEngine.php — Track $uploadErrors, set status to warning + populate status_message
  • SteppedBackupEngine.php — Same, pass errors through completeRecord()
  • SteppedSession.php — Add uploadErrors property for persistence across AJAX steps
  • DashboardModel.php — Include warning status in all dashboard queries
  • System plugin cleanup — Include warning in retention/cleanup queries
  • Templates — Yellow warning badge, status message display, warning treated as valid for download/browse
  • SQL — Migration 01.45.01.sql adds status_message column
  • Language/Filter — New COM_MOKOJOOMBACKUP_STATUS_WARNING key, filter dropdown option

Test plan

  • Trigger a backup with an SFTP remote configured with bad credentials
  • Verify backup record shows yellow "Warning" badge with failure reason
  • Verify the local archive is preserved and downloadable
  • Verify dashboard stats count warning backups
  • Verify retention cleanup includes warning backups
## Summary - Adds `warning` status for backups where the archive was created successfully but remote upload failed (SFTP, FTP, S3, Google Drive) - Adds `status_message` column to `#__mokosuitebackup_records` storing the specific failure reason — visible in the list and detail views without digging through the full log - Both `BackupEngine` and `SteppedBackupEngine` now set `status = 'warning'` and record the error details from each failed remote destination - Warning-status backups are included in dashboard stats, retention cleanup, and archive browser/download actions (the local archive is valid) ## Changes - **BackupEngine.php** — Track `$uploadErrors`, set status to `warning` + populate `status_message` - **SteppedBackupEngine.php** — Same, pass errors through `completeRecord()` - **SteppedSession.php** — Add `uploadErrors` property for persistence across AJAX steps - **DashboardModel.php** — Include `warning` status in all dashboard queries - **System plugin cleanup** — Include `warning` in retention/cleanup queries - **Templates** — Yellow warning badge, status message display, `warning` treated as valid for download/browse - **SQL** — Migration `01.45.01.sql` adds `status_message` column - **Language/Filter** — New `COM_MOKOJOOMBACKUP_STATUS_WARNING` key, filter dropdown option ## Test plan - [ ] Trigger a backup with an SFTP remote configured with bad credentials - [ ] Verify backup record shows yellow "Warning" badge with failure reason - [ ] Verify the local archive is preserved and downloadable - [ ] Verify dashboard stats count warning backups - [ ] Verify retention cleanup includes warning backups
jmiller added 2 commits 2026-06-29 14:35:49 +00:00
fix: mark backup as warning when remote upload fails, show failure reason
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 34s
1f387039a0
- Add 'warning' status for backups where the archive was created
  successfully but remote upload failed (SFTP, FTP, S3, GDrive)
- Add status_message column to records table storing the specific
  failure reason without needing to read the full log
- Display warning badge (yellow) with failure details in backup list
  and detail views
- Include warning-status backups in dashboard stats, retention
  cleanup, and archive browser/download actions
- Add filter option for warning status in backups list
- Add uploadErrors tracking to SteppedSession for multi-step backups

Claude-Session: https://claude.ai/code/session_01MbEjBtsSjPuTWhqqrMS2wG
This pull request has changes conflicting with the target branch.
  • SECURITY.md
  • source/packages/MokoSuiteClient
  • source/packages/com_mokosuitebackup/mokosuitebackup.xml
  • source/packages/com_mokosuitebackup/src/Engine/BackupEngine.php
  • source/packages/com_mokosuitebackup/src/Engine/SteppedBackupEngine.php
  • source/packages/com_mokosuitebackup/src/Model/DashboardModel.php
  • 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
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/remote-upload-failure-status:fix/remote-upload-failure-status
git checkout fix/remote-upload-failure-status
Sign in to join this conversation.