What's new
Retention pruning - The archive now has optional auto-cleanup via two new environment variables:
RETENTION_DAYS: delete all footage older than N days, unconditionallyRETENTION_PERCENT: when disk usage exceeds N%, prune the oldest footage until it drops below the threshold
Both are disabled by default (the archive grows indefinitely, same as before). When both are set, age-based pruning runs first, then disk-based pruning kicks in if usage is still over the threshold. Pruning always works oldest-first using the existing by-date/ directory structure, and cleans up both the by-camera/ files and by-date/ symlinks.
To enable, add to your .env:
RETENTION_DAYS=45
RETENTION_PERCENT=85
Bug fix - Retention now runs even when the DB query returns zero new recordings. Previously the early exit on "no new recordings" would have skipped the retention step entirely.
Upgrading
cd /opt/unvr-nas-backup
./scripts/update.shOr if you installed standalone:
cd /opt/unvr-nas-backup
docker compose pull && docker compose up -d