More robust sample systemd service: boot delay, network dependency, lowered CPU/IO priority, etc (#205).

This commit is contained in:
Dan Helfman 2019-09-24 10:16:30 -07:00
parent 386979ebb4
commit 3846155d62
3 changed files with 20 additions and 2 deletions

4
NEWS
View file

@ -1,3 +1,7 @@
1.3.20.dev0
* #205: More robust sample systemd service: boot delay, network dependency, lowered CPU/IO
priority, etc.
1.3.19
* #219: Fix visibility of "borgmatic prune --stats" output.

View file

@ -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

View file

@ -1,6 +1,6 @@
from setuptools import find_packages, setup
VERSION = '1.3.19'
VERSION = '1.3.20.dev0'
setup(