Skip to content

Condense WordPress backup cleanup report format - #22

Merged
locus313 merged 1 commit into
mainfrom
fix/wordpress-backup-report-format
Aug 25, 2026
Merged

Condense WordPress backup cleanup report format#22
locus313 merged 1 commit into
mainfrom
fix/wordpress-backup-report-format

Conversation

@locus313

@locus313 locus313 commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Problem

On servers with many domains, the report emailed/printed a repetitive 3-line
block per domain, even when nothing was removed for that domain:

Domain: example1.com
  Backups found: 3
  Would remove (dry-run): 0

Domain: example2.com
  Backups found: 1
  Would remove (dry-run): 0
...

This becomes an unreadable wall of text with 50+ domains.

Fix

build_report() now produces:

  1. A one-line summary with totals (domains scanned, backups found, removed)
  2. A "Backups removed by domain" section, listing only domains that actually
    had something removed/would-remove, with filenames indented underneath
  3. A compact one-line-per-domain "Backups found by domain" table

Testing

  • shellcheck clean (pre-existing intentional-glob info only)
  • Manual test with 4 fake domains (mixed found/removed/zero counts, dry-run)
    confirms the summary, removed-section, and counts table render correctly

Previous report repeated a 3-line block per domain (including "removed: 0"
for every domain with nothing to remove), producing an unreadable wall of
text on servers with many domains.

New format:
- One summary line with totals (domains scanned, backups found, removed)
- "Backups removed by domain" section listing only domains with something
  removed/would-remove, with filenames
- Compact one-line-per-domain "Backups found by domain" table

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@locus313
locus313 merged commit a6fc1d9 into main Aug 25, 2026
1 check passed
@locus313
locus313 deleted the fix/wordpress-backup-report-format branch August 25, 2026 00:04
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