|
@@ -1,7 +1,21 @@
|
|
|
[Unit]
|
|
|
Description=borgmatic backup
|
|
|
+Wants=network-online.target
|
|
|
+After=network-online.target
|
|
|
|
|
|
[Service]
|
|
|
Type=oneshot
|
|
|
-ExecStart=/root/.local/bin/borgmatic
|
|
|
+
|
|
|
+# Lower CPU and I/O priority.
|
|
|
+Nice=19
|
|
|
+CPUSchedulingPolicy=batch
|
|
|
+IOSchedulingClass=best-effort
|
|
|
+IOSchedulingPriority=7
|
|
|
+IOWeight=100
|
|
|
+
|
|
|
+Restart=no
|
|
|
LogRateLimitIntervalSec=0
|
|
|
+
|
|
|
+# Delay start to prevent backups running during boot.
|
|
|
+ExecStartPre=sleep 1m
|
|
|
+ExecStart=systemd-inhibit --who="borgmatic" --why="Prevent interrupting scheduled backup" /root/.local/bin/borgmatic --syslog-verbosity 1
|