Proxmox Backup Status → ntfy
Sendet nach jedem Proxmox Backup automatisch eine kompakte Statusmeldung an einen ntfy-Server.
Der Hauptunterschied zum integrierten Benachrichtigungssystem von Proxmox ist die Übersichtlichkeit und die korrekte Priorisierung der Benachrichtigungen.
Erfolgreiche Backups haben normale Priorität, fehlgeschlagene die höchste Priorität. Das erlaubt es, sich ausschließlich bei Fehlern benachrichtigen zu lassen.
Die Nachricht enthält unter anderem:
- Backup-Status (Erfolg/Fehler)
- Start- und Endzeit
- Gesicherte Systeme
- Laufzeit
- Optional komplettes Logfile bei Fehlern
Beispiel Benachrichtigungen
| Erfolgreiches Backup | Fehlgeschlagenes Backup |
|---|---|
![]() |
![]() |
Installation
Scripte z. B. nach:
/root/scripts/shell_proxmox_backup_status_to_ntfy.sh
/root/scripts/shell_proxmox_backup_status_to_ntfy_hook.sh
kopieren und ausführbar machen:
chmod +x /root/scripts/shell_proxmox_backup_status_to_ntfy.sh
chmod +x /root/scripts/shell_proxmox_backup_status_to_ntfy_hook.sh
Proxmox konfigurieren
Damit Proxmox das Script nach jedem Backup automatisch ausführt, muss die Datei:
nano /etc/vzdump.conf
angepasst werden.
Folgende Zeile ergänzen:
script: /root/scripts/shell_proxmox_backup_status_to_ntfy_hook.sh
Beispiel:
# vzdump default settings
#tmpdir: DIR
#dumpdir: DIR
#storage: STORAGE_ID
#mode: snapshot|suspend|stop
#bwlimit: KBPS
script: /root/scripts/shell_proxmox_backup_status_to_ntfy_hook.sh
#exclude-path: PATHLIST
Danach wird das Script automatisch von Proxmox bei jedem vzdump-Backup aufgerufen.
Konfiguration
Die Konfiguration erfolgt über eine .env Datei.
Beispiel:
# =========================================================
# NTFY KONFIGURATION
# =========================================================
# IP oder Domain deines ntfy-Servers
SERVER="192.168.178.25:5885"
# Der Name des Kanals (Topic)
TOPIC="Proxmox"
# Authentifizierungs-Token
TOKEN="tk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# Optional: Link zu einem Icon für die Benachrichtigung
NTFY_ICON=""
# =========================================================
# BACKUP-LOG EINSTELLUNGEN
# =========================================================
# Steuert, ob das detaillierte Backup-Log angehängt werden soll.
# Mögliche Werte:
# "true" oder "ja" -> Log wird gesendet
# "false" oder "nein" -> Log wird nicht gesendet
# "error" -> Log wird nur bei Fehlern gesendet (default)
SEND_LOGFILE=error

