Interrupted backups stay 'running' forever; End Time renders '-0001'; no log #307

Open
opened 2026-07-18 20:17:37 +00:00 by jmiller · 1 comment
Owner

Type: bug Priority: high Component: com_mokosuitebackup

Summary

When the driving window/CLI dies mid-run (closed tab, PHP timeout, killed cron), the record is orphaned in running with a null end time, appears as a phantom in-progress backup on the dashboard, shows (no log available), and — until the Cancel-Stalled fatal is fixed — could not be cleared.

The backup detail view also renders the null backupend (0000-00-00 00:00:00) as the bogus "Monday, November 29, -0001".

Fix (this PR)

  • BackupStatusHelper::markStalledAsFailed() flips running records older than a 1h threshold to fail; swept when the records list loads (the threshold spares genuinely in-flight scheduled/CLI backups, which run without the admin browser lock).
  • Detail view shows Not finished for a null/zero backupend.

Follow-up (not in this PR)

  • Persist a backup log even for interrupted runs, and add a real heartbeat column so the stalled-detection does not rely on start-time age.
**Type:** bug **Priority:** high **Component:** com_mokosuitebackup ### Summary When the driving window/CLI dies mid-run (closed tab, PHP timeout, killed cron), the record is orphaned in `running` with a null end time, appears as a phantom in-progress backup on the dashboard, shows `(no log available)`, and — until the Cancel-Stalled fatal is fixed — could not be cleared. The backup detail view also renders the null `backupend` (`0000-00-00 00:00:00`) as the bogus **"Monday, November 29, -0001"**. ### Fix (this PR) - `BackupStatusHelper::markStalledAsFailed()` flips `running` records older than a 1h threshold to `fail`; swept when the records list loads (the threshold spares genuinely in-flight scheduled/CLI backups, which run without the admin browser lock). - Detail view shows **Not finished** for a null/zero `backupend`. ### Follow-up (not in this PR) - Persist a backup log even for interrupted runs, and add a real heartbeat column so the stalled-detection does not rely on start-time age.
Author
Owner

Branch created: feature/307-interrupted-backups-stay-running-forever

git fetch origin
git checkout feature/307-interrupted-backups-stay-running-forever
Branch created: [`feature/307-interrupted-backups-stay-running-forever`](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteBackup/src/branch/feature/307-interrupted-backups-stay-running-forever) ```bash git fetch origin git checkout feature/307-interrupted-backups-stay-running-forever ```
Sign in to join this conversation.