feat: Snapshot retention, extended snapshots, graceful remote degradation (#63, #57, #66) #88

Closed
jmiller wants to merge 0 commits from feat/batch-63-57-66 into main
Owner

Summary

Three feature issues in one PR. Closes #63, closes #57, closes #66.

#63: Snapshot retention & auto-cleanup

  • config.xml: new snapshot_retention_count (default 20) and snapshot_retention_days (default 30) settings
  • System plugin: cleanupOldSnapshots() runs alongside existing backup cleanup, deletes JSON files + DB records
  • 5 new language strings

#57: Extend snapshots with custom fields and tags

When articles are included in a snapshot, now also captures:

  • #__tags — tag definitions
  • #__fields — custom field definitions (filtered to com_content.article)
  • #__fields_values — custom field values
  • #__fields_categories — field-to-category mappings

Restore correctly scopes deletes to avoid touching non-content fields.

#66: Graceful remote upload degradation

  • Remote upload failure no longer marks the entire backup as failed
  • Both BackupEngine and SteppedBackupEngine wrap upload in try-catch
  • Local archive preserved with status complete, upload failure logged as WARNING
  • Upload failure notification sent separately from backup success notification

CHANGELOG

Updated with all three entries.

Test Plan

  • Snapshot retention: set max count to 3, create 5 snapshots, verify oldest 2 are deleted
  • Snapshot retention: set max age to 0 (unlimited), verify no age-based deletion
  • Extended snapshot: create snapshot with articles, verify JSON contains tags + fields tables
  • Extended snapshot restore: replace mode deletes only com_content fields, not other contexts
  • Remote upload failure: configure invalid S3 creds, run backup, verify status is complete not fail
  • Remote upload failure: verify upload failure notification is sent
## Summary Three feature issues in one PR. Closes #63, closes #57, closes #66. ### #63: Snapshot retention & auto-cleanup - `config.xml`: new `snapshot_retention_count` (default 20) and `snapshot_retention_days` (default 30) settings - System plugin: `cleanupOldSnapshots()` runs alongside existing backup cleanup, deletes JSON files + DB records - 5 new language strings ### #57: Extend snapshots with custom fields and tags When articles are included in a snapshot, now also captures: - `#__tags` — tag definitions - `#__fields` — custom field definitions (filtered to `com_content.article`) - `#__fields_values` — custom field values - `#__fields_categories` — field-to-category mappings Restore correctly scopes deletes to avoid touching non-content fields. ### #66: Graceful remote upload degradation - Remote upload failure no longer marks the entire backup as failed - Both `BackupEngine` and `SteppedBackupEngine` wrap upload in try-catch - Local archive preserved with status `complete`, upload failure logged as WARNING - Upload failure notification sent separately from backup success notification ## CHANGELOG Updated with all three entries. ## Test Plan - [ ] Snapshot retention: set max count to 3, create 5 snapshots, verify oldest 2 are deleted - [ ] Snapshot retention: set max age to 0 (unlimited), verify no age-based deletion - [ ] Extended snapshot: create snapshot with articles, verify JSON contains tags + fields tables - [ ] Extended snapshot restore: replace mode deletes only com_content fields, not other contexts - [ ] Remote upload failure: configure invalid S3 creds, run backup, verify status is `complete` not `fail` - [ ] Remote upload failure: verify upload failure notification is sent
jmiller added the component: enginecomponent: scheduler labels 2026-06-22 00:09:40 +00:00
jmiller added 3 commits 2026-06-22 00:09:40 +00:00
Add retention settings for content snapshots (max count, max age days)
in component options. System plugin runs cleanupOldSnapshots() alongside
existing backup cleanup, deleting JSON files and DB records.

Closes #63
When articles are included in a snapshot, now also captures:
- #__tags (tag definitions)
- #__fields (custom field definitions for com_content.article)
- #__fields_values (custom field values)
- #__fields_categories (field-to-category mappings)

Restore correctly scopes deletes to avoid touching non-content fields.

Closes #57
fix: graceful degradation when remote upload fails (#66)
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 2s
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 5s
Generic: Repo Health / Access control (pull_request) Successful in 2s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Universal: PR Check / Validate PR (pull_request) Failing after 9s
Universal: PR Check / Secret Scan (pull_request) Successful in 11s
Branch Cleanup / Delete merged branch (pull_request) Has been skipped
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Has been skipped
Universal: Auto Version Bump / Version Bump (push) Successful in 11s
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 44s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 47s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 17s
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been skipped
8b6e260b28
Remote upload failure (S3/FTP/GDrive) no longer marks the entire
backup as failed. The local archive is preserved with status
'complete' and the upload failure is logged as a warning. Applies
to both BackupEngine and SteppedBackupEngine.

Closes #66
jmiller closed this pull request 2026-06-22 00:10:00 +00:00
jmiller deleted branch feat/batch-63-57-66 2026-06-22 00:10:01 +00:00

Pull request closed

This pull request cannot be reopened because the branch was deleted.
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#88