Repository Presets
Hardened Systemd Timer (OnCalendar + RandomizedDelaySec)
Replace brittle root crontabs with cgroup memory-capped systemd units, RandomizedDelaySec jitter, and Persistent=true catch-up runs.
MemoryMax Capped · Nice=10 · Missed-Run Catch-Up
Why Systemd Timers Beat Legacy /etc/cron.d
Standard cron silently drops jobs if a host is rebooting at 02:15 and provides zero cgroup isolation. A systemd timer with Persistent=true catches up immediately on boot, while Nice=10 and IOSchedulingClass=best-effort protect live application latency.
Sizing MemoryMax from Your Unique Chunk Count
Never set MemoryMax blindly to 512M on a 10M-chunk repo or systemd will OOM-kill borg compact. Use the BorgmaticCron calculator to size MemoryMax at 1.35x your peak hashtable + rehash RSS.
Measured Thresholds & Borgmatic Configuration
| Systemd Directive | Recommended Value | Behavior |
|---|---|---|
| OnCalendar | *-*-* 02:15:00 | Triggers nightly outside daytime traffic peaks |
| RandomizedDelaySec | 1200 (20 minutes) | Prevents thundering-herd SSH spikes across multi-server fleets |
| Persistent | true | Runs missed backup automatically after server reboot or downtime |
| MemoryHigh / MemoryMax | 80% / 100% of sized Borg ceiling | Protects co-located Postgres/web apps from OOM during borg check |