gitea-backup-pull: switch vlda-01 retention from a fixed count to a 30-day rotation

KEEP=30 (last 30 archives) approximated 30 days only if there was
exactly one dump per day. Prune by file mtime instead (find -mtime +30)
so a catch-up burst after time offline doesn't prematurely evict
recent dumps, and a quiet stretch doesn't hoard month-old ones.
This commit is contained in:
2026-07-26 20:30:02 +02:00
parent 45856f48f8
commit 2b86579fb8
3 changed files with 20 additions and 8 deletions
+8 -2
View File
@@ -479,8 +479,14 @@ The SSH keypair needed no special handling: Unraid already auto-mirrors
relying on the file's own (nonexistent) `+x`.
- Lands in `/mnt/disks/WSD2L840/git/` — an **Unassigned Device** (external
disk, not part of the protected array), not the RAM-backed root — keeps
the last 30 locally, now the real long-term history given alpha deletes
its own copies right after a verified pull.
a rolling 30 calendar days locally (by file `mtime`, not a fixed file
count — a burst of catch-up pulls after being offline a while shouldn't
prematurely evict genuinely recent dumps, and a quiet stretch shouldn't
keep month-old ones around just for lack of newer arrivals), now the
real long-term history given alpha deletes its own copies right after a
verified pull. Verified live: a synthetic 40-day-old dump + its
checksum file were correctly pruned while a genuine 20-day-old one and
everything newer were left untouched.
- **The device isn't guaranteed to already be mounted** when the script
runs, so it resolves the disk by filesystem label (`findfs
LABEL=WSD2L840`, not a hardcoded `/dev/sdX` — USB/Unassigned-Device