proxmox-backup-client notification on failed/successful backup

nordicaussie

New Member
Jun 11, 2024
1
1
1
Hi there!

I'm trying to configure a way to get notified if a proxmox-backup-client job is successful or failed.

I can't see any post-hook or anything like that, i'm currently running it as a cron job.

There is mention of a --output-format in the documentation, but when I put that in the command, it doesn't accept it, I also tried the environment variable, and that seemed to do nothing.

Does anyone have a way of using the output to trigger notifications based on whether the backup was successful or not?

Thanks!
 
  • Like
Reactions: guletz
I'm trying to configure a way to get notified
There is a whole chapter for this in the official documentation: https://pbs.proxmox.com/docs/notifications.html

based on whether
That's probably controlled by a "matcher": https://pbs.proxmox.com/docs/notifications.html#notification-matchers


Disclaimer: I am just using the classic mechanism, now called "mail-to-root"...

----
Edit: I reread your post and realized you are talking about the cli client. So please ignore my post...
 
Last edited:
Same problem here. I even set the matcher on PBS notifications to "Any" without any additional criteria and I'm getting nothing. I used to get verify, prune and gc notices when they completed (success or failure) now I get bumkus. Test notification always works though.
 
So I've now set up both direct to Gmail with authentication as well as local postfix and the default notification settings that were already present. Tests work for all 3 but from my testing it looks like only events triggered from the Datastore -> DatastoreName screen will trigger any notifications. If you have a bare-metal client backing up with proxmox-backup-client, zero notifications will fire upon completion even if they include prune and verify flags. If you manually trigger a scheduled job (gc, prune, verify, etc) from the management screen then you will get a notification when it completes. That means that only a partial group of the notifications currently work from the instructions on the documentation page. For instance, package updates aren't working, nor are the ones that match "system-mail"
 
Last edited:
  • Like
Reactions: Dark26
Im too, getting no notifications at all, from the manuel triggered jobs or per shedule. Test notifications allways work.
 
Im too, getting no notifications at all, from the manuel triggered jobs or per shedule. Test notifications allways work.

What's your /etc/proxmox-backup/notifications.cfg ?
Is the Notification mode for your datastores set to 'Notification System' (Datastore > Options > Notification mode)?
 
What's your /etc/proxmox-backup/notifications.cfg ?
Is the Notification mode for your datastores set to 'Notification System' (Datastore > Options > Notification mode)?
Code:
root@pbs:~# cat /etc/proxmox-backup/notifications.cfg
sendmail: mail-to-root
        comment Send mails to root@pam's email address
        mailto-user root@pam

matcher: default-matcher
        comment Route everything but successful prune job notifications to mail-to-root
        invert-match true
        match-field exact:type=prune
        match-severity info
        mode all
        target mail-to-root
        target Telegram-Test

webhook: Telegram-Test
        method post
        url https://api.telegram.org/bot{{ secrets.BOT_TOKEN }}/sendMessage?chat_id={{ secrets.CHAT_ID }}&text={{ url-encode "PVE Backupserver Notification" }}%0A%0ATitle:+{{ url-encode title }}%0AMessage:+{{ url-encode message }}%0ASeverity:+{{ url-encode severity }}%0ATime:+{{ timestamp }}

matcher: TG-Test
        match-field exact:type=verify
        mode any
        target Telegram-Test
        target mail-to-root

matcher: All
        mode all
        target Telegram-Test
        target mail-to-root
root@pbs:~#

1737659385648.png
The matcher: All is copied from PVE where it works.