borgmatic.service 500 B

123456789101112131415161718192021
  1. [Unit]
  2. Description=borgmatic backup
  3. Wants=network-online.target
  4. After=network-online.target
  5. [Service]
  6. Type=oneshot
  7. # Lower CPU and I/O priority.
  8. Nice=19
  9. CPUSchedulingPolicy=batch
  10. IOSchedulingClass=best-effort
  11. IOSchedulingPriority=7
  12. IOWeight=100
  13. Restart=no
  14. LogRateLimitIntervalSec=0
  15. # Delay start to prevent backups running during boot.
  16. ExecStartPre=sleep 1m
  17. ExecStart=systemd-inhibit --who="borgmatic" --why="Prevent interrupting scheduled backup" /root/.local/bin/borgmatic --syslog-verbosity 1