2016-07-04 18:19:34 +02:00
|
|
|
[Unit]
|
|
|
|
Description=borgmatic backup
|
2019-09-24 19:16:30 +02:00
|
|
|
Wants=network-online.target
|
|
|
|
After=network-online.target
|
2019-09-24 19:43:30 +02:00
|
|
|
ConditionACPower=true
|
2016-07-04 18:19:34 +02:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=oneshot
|
2019-09-24 19:16:30 +02:00
|
|
|
|
|
|
|
# Lower CPU and I/O priority.
|
|
|
|
Nice=19
|
|
|
|
CPUSchedulingPolicy=batch
|
|
|
|
IOSchedulingClass=best-effort
|
|
|
|
IOSchedulingPriority=7
|
|
|
|
IOWeight=100
|
|
|
|
|
|
|
|
Restart=no
|
2020-01-02 19:05:32 +01: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-12 02:03:40 +02:00
|
|
|
LogRateLimitIntervalSec=0
|
2019-09-24 19:16:30 +02:00
|
|
|
|
|
|
|
# Delay start to prevent backups running during boot.
|
2020-01-02 02:14:55 +01:00
|
|
|
ExecStartPre=/usr/bin/sleep 1m
|
|
|
|
ExecStart=/usr/bin/systemd-inhibit --who="borgmatic" --why="Prevent interrupting scheduled backup" /root/.local/bin/borgmatic --syslog-verbosity 1
|