Skip to content

backup retention: newest per day for 30 days, per month for 12, per year forever - #29

Merged
royashbrook merged 2 commits into
mainfrom
backup-gfs-retention
Nov 5, 2026
Merged

royashbrook merged 2 commits into
mainfrom
backup-gfs-retention

Conversation

@royashbrook

Copy link
Copy Markdown
Owner

refs #28.

backup retention was newest N files. at --keep 30 a 6h schedule is a week of history. nothing older survives.

now tiered: newest per day for 30 days, newest per month for 12 months, newest per year forever. one file can fill several slots. gaps don't shorten anything, periods are whatever is in that folder. period comes from filename stamp not mtime, icloud rewrites mtime. only hush-backup-.gpg files ever get removed, same guard as before.

HUSH_BACKUP_KEEP is still days. HUSH_BACKUP_KEEP_MONTHS is new, default 12. scheduler --keep is days. config unchanged, no reinstall needed.

tests cover 51 stamped files across three years and hold for any run date. 1.7.0 in package.json and SKILL.md.

heads up, two backups same day collapse to newest at next prune. that is what a day slot means but it differs from before.

…ast 30 days, 12 months, and every year (refs #28)

keep-newest-N made a 6h schedule a week of history and a daily one a month, nothing older. now the
newest backup of each of the last HUSH_BACKUP_KEEP days that have one, of each of the last
HUSH_BACKUP_KEEP_MONTHS months that have one (default 12), and of every year is kept; one file can
fill several slots. periods are the ones present in the folder, so a gap never shortens what is
kept, and the period comes from the filename stamp, not mtime. --keep on the scheduler is days.
tests: a stamped fixture across three years, assertions that hold for any run date, the smallest
window, unrelated files untouched. version 1.7.0.
…d the version pins move to 1.7.0 (refs #28)

ci ran at 15:51Z, so the backup it wrote was the newest file of 2026-11-05 and took that day's slot from the fixture pair. the pair now sits on 11-04. HUSH_VERSION in the cli script moves with package.json and SKILL.md, the maintenance suite pins all three.
@royashbrook
royashbrook merged commit 12c74db into main Nov 5, 2026
1 check passed
@royashbrook
royashbrook deleted the backup-gfs-retention branch November 5, 2026 16:16
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