Skip to content

v0.1.9

Latest

Choose a tag to compare

@tvancott42 tvancott42 released this 06 Apr 15:21
· 1 commit to main since this release

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, unconditionally
  • RETENTION_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.sh

Or if you installed standalone:

cd /opt/unvr-nas-backup
docker compose pull && docker compose up -d