43 lines
937 B
Desktop File
43 lines
937 B
Desktop File
[Unit]
|
||
Description=Restic System Backup
|
||
Documentation=man:restic(1)
|
||
Wants=network-online.target
|
||
After=network-online.target
|
||
|
||
# Falls ein altes Restic läuft → killen, damit keine Locks bleiben
|
||
Conflicts=restic-backup.service
|
||
|
||
[Service]
|
||
Type=simple
|
||
# Output direkt an journal
|
||
StandardOutput=journal
|
||
StandardError=journal
|
||
|
||
# Backup soll das gesamte System sehen → root
|
||
User=root
|
||
|
||
# Passwort für das Repo
|
||
Environment=RESTIC_PASSWORD_FILE=/home/ratatoskr/.restic-pass
|
||
|
||
# Dein Script – ohne sudo, ohne Pfadprobleme
|
||
ExecStart=/usr/local/bin/restic-backup
|
||
|
||
# Damit systemd weiß: nicht killen, wenn es lange dauert (z. B. >30 min)
|
||
TimeoutStartSec=0
|
||
|
||
# Prioritäten – Backup darf langsam sein, aber stabil
|
||
Nice=19
|
||
IOSchedulingClass=best-effort
|
||
IOSchedulingPriority=7
|
||
|
||
# Wenn das Backup crasht → 3 Versuche
|
||
Restart=on-failure
|
||
RestartSec=30
|
||
|
||
# Mehr Log-Ausgaben behalten
|
||
LogRateLimitIntervalSec=0
|
||
|
||
[Install]
|
||
WantedBy=multi-user.target
|
||
|