2016-07-04 09:19:34 -07:00
|
|
|
[Unit]
|
|
|
|
Description=borgmatic backup
|
2019-09-24 10:16:30 -07:00
|
|
|
Wants=network-online.target
|
|
|
|
After=network-online.target
|
2019-09-24 10:43:30 -07:00
|
|
|
ConditionACPower=true
|
2016-07-04 09:19:34 -07:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=oneshot
|
2019-09-24 10:16:30 -07:00
|
|
|
|
|
|
|
# Lower CPU and I/O priority.
|
|
|
|
Nice=19
|
|
|
|
CPUSchedulingPolicy=batch
|
|
|
|
IOSchedulingClass=best-effort
|
|
|
|
IOSchedulingPriority=7
|
|
|
|
IOWeight=100
|
|
|
|
|
|
|
|
Restart=no
|
2020-01-02 10:05:32 -08:00
|
|
|
# Prevent rate limiting of borgmatic log events. If you are using an older version of systemd that
|
|
|
|
# doesn't support this (pre-240 or so), you may have to remove this option.
|
2019-06-11 17:03:40 -07:00
|
|
|
LogRateLimitIntervalSec=0
|
2019-09-24 10:16:30 -07:00
|
|
|
|
|
|
|
# Delay start to prevent backups running during boot.
|
2020-01-21 16:03:24 -08:00
|
|
|
ExecStartPre=sleep 1m
|
|
|
|
ExecStart=systemd-inhibit --who="borgmatic" --why="Prevent interrupting scheduled backup" /root/.local/bin/borgmatic --syslog-verbosity 1
|