Feat: Backup Retention, Dedup, Compression & Pin
Backups now manage themselves. No more 15+ GB of identical snapshots accumulating silently.
What's New
Automatic Retention
- Keeps the 5 most recent unpinned backups, prunes the rest automatically
- Runs after every install, sync, and upgrade
Deduplication
- Computes a SHA-256 composite checksum of all config files before creating a backup
- If nothing changed since the last backup, the new one is skipped entirely
Compression
- New backups use
tar.gzinstead of plain file copies (~75% smaller) - Legacy uncompressed backups are still fully supported for restore
Pin Protection
- Mark any backup as "pinned" via the TUI (
pkey) to protect it from auto-pruning - Pinned backups show a
[pinned]indicator and are never automatically deleted
TUI Backup Keys
| Key | Action |
|---|---|
p
| Pin/unpin backup |
r
| Rename (add description) |
d
| Delete |
Enter
| Restore |
Real-world impact (tested on a dev machine)
| Before | After |
|---|---|
| 105 backups | 6 backups |
| 19 GB | 876 MB |
Security
- Path traversal protection in archive extraction (prefix check + symlink/hardlink filtering)
- Absolute path guard in compressed restore
- All error paths logged consistently
Backward Compatibility
- Old uncompressed backups restore normally — no migration needed
- New manifest fields (
pinned,compressed,checksum) useomitempty— old manifests parse without issues
See Backup & Rollback Guide for full documentation.