Skip to content

Add min-keep retention and email report to WordPress backup cleanup - #20

Merged
locus313 merged 1 commit into
mainfrom
feature/wordpress-backup-min-keep-and-email-report
Aug 24, 2026
Merged

Add min-keep retention and email report to WordPress backup cleanup#20
locus313 merged 1 commit into
mainfrom
feature/wordpress-backup-min-keep-and-email-report

Conversation

@locus313

Copy link
Copy Markdown
Collaborator

Summary

  • MIN_KEEP (default 3): each domain always retains its N most recent WordPress backups, regardless of DAYS age-based retention.
  • EMAIL_TO/EMAIL_SUBJECT: sends a per-domain report (backups found, backups removed/would-remove, filenames removed) via the local mail command.
  • SMTP_SERVER/SMTP_PORT/SMTP_AUTH_USER/SMTP_AUTH_PASS/SMTP_SECURE/SMTP_FROM: SMTP relay fallback via curl for servers with no local MTA, matching the SMTP env var naming already used in monitor-aspnet.bat.
  • README updated (features, usage examples, env var docs).

Testing

  • shellcheck clean (only a pre-existing intentional-glob info remains).
  • Manual functional tests against temp vhost/backup directory trees:
    • Dry-run and real deletion correctly keep the MIN_KEEP newest backups per domain.
    • Email report content verified with a stubbed mail command.
    • SMTP fallback verified with a stubbed curl command (no mail present), confirming STARTTLS flag, auth, and headers.

…il report

- Add MIN_KEEP (default 3) so each domain always retains its N most recent
  WordPress backups regardless of age, on top of the existing DAYS retention
- Add EMAIL_TO/EMAIL_SUBJECT to send a per-domain report (backups found,
  removed, and filenames removed) via the local mail command
- Add SMTP_SERVER/SMTP_PORT/SMTP_AUTH_USER/SMTP_AUTH_PASS/SMTP_SECURE/
  SMTP_FROM fallback (via curl) for servers without a local MTA, matching
  the SMTP env var naming already used in monitor-aspnet.bat
- Update README features, usage examples, and env var docs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@locus313
locus313 merged commit f2db15a into main Aug 24, 2026
1 check passed
@locus313
locus313 deleted the feature/wordpress-backup-min-keep-and-email-report branch August 24, 2026 23:50
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