413d0bdb1b
Agent runs as root (HOME=/root from systemd) with ProtectHome= read-only, so restic's `mkdir /root/.cache/restic` fails on the first call. Backups still completed (restic falls back to no-cache) but every job log started with a noisy red "unable to open cache" warning. Default to /var/lib/restic-manager unconditionally — that's already in the unit's ReadWritePaths and survives ProtectHome. ExtraEnv overrides still win for tests / unusual setups. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>