restic-auto-backup/restic-backup.service

43 lines
937 B
Desktop File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[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