Skip to content

Show backup dates in WordPress cleanup report - #24

Merged
locus313 merged 1 commit into
mainfrom
feature/backup-report-dates
Aug 25, 2026
Merged

Show backup dates in WordPress cleanup report#24
locus313 merged 1 commit into
mainfrom
feature/backup-report-dates

Conversation

@locus313

Copy link
Copy Markdown
Collaborator

Summary

  • The "Backups found by domain" table (console and HTML email) now shows
    each domain's newest and oldest backup date, so you can see backup
    freshness at a glance instead of just a count.
  • Removed/would-remove file entries now show the file's date next to the
    filename, e.g. backup-4.tar.gz (2025-07-20).

Bug fix included

Found and fixed a set -u crash in scan_domains(): a domain with zero
backup files hit a negative array index (dates[-1]) on an empty array,
which errors under set -u rather than returning empty. Now explicitly
guarded.

Testing

  • shellcheck clean (pre-existing intentional-glob info only)
  • Manual test covering a domain with backups, a domain with removed files,
    and a domain with zero backups (regression test for the crash above)
  • Manual test of the HTML email path confirming newest/oldest columns render

- Backups found table now includes each domain's newest and oldest backup
  date (both console and HTML email), or "-" when a domain has no backups
- Removed-file entries now show the file's date next to its name
- Fixed a set -u crash in scan_domains when a domain directory has zero
  backup files (negative array index on an empty array)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@locus313
locus313 merged commit bbc69d5 into main Aug 25, 2026
1 check passed
@locus313
locus313 deleted the feature/backup-report-dates branch August 25, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant