remote-backups.comremote-backups.com
Contact illustration
Sign In
Don't have an account ?Sign Up

Proxmox Backup Job Notifications: Set Up Alerts

A backup job fails at 02:00, and nobody knows until someone needs a restore. Proxmox VE can send an alert for every failed backup job, and so can the datastore that receives the backups. Set up both: each side sees different failures. Then test the alerts before you need them.

Key Takeaways
  • Proxmox VE sends backup notifications through targets (Sendmail, SMTP, Gotify, Webhook) and matchers. Configure them in Datacenter > Notifications.
  • With the default notification mode auto, a backup job sends mail to the job's mailto address if it is set. If it is not set, the job uses the notification system.
  • remote-backups.com sends one message per backup run and datastore, with the status of each guest, to email, chat and push services, or a webhook.
  • The two sides see different failures. Proxmox VE sees errors before data reaches the server. The datastore side works even when the mail setup of the node is broken.
  • Neither side alerts when a job does not run at all. Treat a missing success message as a warning.

Two places that can send an alert

A backup from Proxmox VE to a Proxmox Backup Server datastore has two ends:

  • The Proxmox VE node runs the backup job (vzdump). It knows when a job cannot start, cannot reach the storage, or fails for a guest.
  • The datastore on the Proxmox Backup Server receives the backup. On remote-backups.com, the service records the backup tasks on the server and can send a message when a backup run ends.

Each side has gaps. A node with a broken mail relay sends nothing. A datastore never sees a backup that failed before it reached the server. Use both.

Set up notifications in Proxmox VE

Since Proxmox VE 8.1, notifications use a central system. The Proxmox VE documentation describes three parts: notification events, matchers that route the events, and targets that deliver them. You configure all of them in the web interface under Datacenter > Notifications. The configuration is in /etc/pve/notifications.cfg, and the secrets (passwords, tokens) are in /etc/pve/priv/notifications.cfg.

Choose a target

Proxmox VE has four target types:

  • Sendmail uses the local sendmail command, which Postfix provides on a standard installation. Postfix must be able to deliver mail, for example through a relay host.
  • SMTP sends directly to a mail relay. The documentation states that SMTP targets have no queue and no retry when a delivery fails.
  • Gotify sends a push message to a Gotify server.
  • Webhook sends an HTTP request to a URL. The body can use templates such as {{ title }}, {{ message }} and {{ severity }}.

A Sendmail or SMTP target can send to a user. Proxmox VE then uses the email address of that user from Datacenter > Permissions > Users. A user without an email address gets no mail.

Route backup events with a matcher

A matcher decides which events go to which targets. A backup job creates an event of type vzdump. A successful backup has the severity info, and a failed backup has the severity error. For an alert on failed backups only, create a matcher with two rules: the field type matches vzdump, and the severity matches error. Then select your target under Targets to Notify.

The job-id field is set only when the job runs on its schedule. A backup that you start with Run now has no job-id, so a matcher on job-id does not match it.

Matcher format in Proxmox VE 9.3

From Proxmox VE 9.3, the web interface stores match rules as one expression option. The older options (match-field, match-severity, match-calendar) still work at least until the next major release.

Check the notification mode of the job

Each backup job has a notification mode. The vzdump documentation lists four values:

  • auto (the default): if the job has a mailto address, it sends mail with sendmail to that address. If not, it uses the notification system.
  • notification-system: the job uses the targets and matchers, and ignores mailto.
  • legacy-sendmail: the job sends mail to mailto, always or only on failure. It ignores the targets and matchers. The documentation states that this mode might be removed in a later release.
  • none: the job sends no notification.

An old job with a mailto address keeps the old behavior in auto mode. If your new Gotify or webhook target gets no backup messages, check this first.

Test the target

Send a test message before you trust a target. In Datacenter > Notifications, select the target and click Test. The API has the same function:

bash
pvesh create /cluster/notifications/targets/<target-name>/test
Send a test notification (on a PVE node)

A test checks the delivery path. It does not check the matcher. To test the full path, run a backup of a small guest and check that the message arrives.

Set up notifications for your remote-backups.com datastore

The datastore side does not depend on the mail setup of your nodes. In the remote-backups.com dashboard, open Settings > Notifications and add a notification. Each notification has:

  • A channel: Email, Discord, Telegram, Microsoft Teams, Slack, Pushover, ntfy, Gotify or a generic webhook.
  • A datastore filter: one datastore, or All Datastores.
  • Job types: Backup, Prune, Verification, Synchronization and Garbage Collection, each with a Success and a Failure checkbox.

You can add more than one notification, for example email for failures and a chat channel for all results.

One message per backup run

Proxmox VE creates one backup task on the Proxmox Backup Server for each guest. The service does not send one message per guest. It collects the backup tasks of a datastore into one backup run. The run ends when all its tasks are finished and more than 5 minutes have passed since the last task ended. Then the service sends one message with each guest and its status. The subject has this form: Backup completed: "pve-prod" - 12 VM(s), 1 failed. A backup counts as failed when its task on the server does not end with the status OK.

Prune, verification, synchronization and garbage collection jobs send one message per task. If a job runs every hour, turn off its Success checkbox and keep Failure on. Proxmox Backup Server Verify Jobs explains why verify failures need attention.

Use the generic webhook

The generic webhook sends an HTTP POST request with a JSON body to your URL. You can add headers, for example Authorization: Bearer <token>, one per line. A finished backup run has this form:

json
{
  "type": "backup_group_complete",
  "datastoreId": "507f1f77bcf86cd799439011",
  "datastoreName": "pve-prod",
  "taskCount": 3,
  "failedCount": 1,
  "immutableSyncTriggered": false,
  "tasks": [
    { "workerId": "507f1f77bcf86cd799439011:vm/101", "status": "done", "upid": "UPID:..." },
    { "workerId": "507f1f77bcf86cd799439011:vm/102", "status": "error", "upid": "UPID:..." },
    { "workerId": "507f1f77bcf86cd799439011:ct/100", "status": "done", "upid": "UPID:..." }
  ]
}
Webhook body for a finished backup run

Use failedCount to decide if your system opens a ticket. The settings page shows a preview of the payload for each job type.

What neither side can see

Both systems send a message when something runs. Neither sends a message when nothing runs. If a node is off, the job is disabled, or the schedule is wrong, no task starts, and no alert comes.

So treat a missing success message as a warning. Keep success messages on for backups in one channel that someone reads every day. For a dashboard with the age of the last backup, use metrics: PBS Monitoring with Prometheus and Grafana shows a setup. Backup Monitoring & Alerting describes a case where backups failed for two weeks and no alert arrived.

An alert also does not prove that a restore works. PBS Restore Testing covers that part.

A short checklist

In Proxmox VE: a target, a matcher for type vzdump, and the job in notification mode auto without mailto, or in notification-system. On the datastore side: Failure on for all job types, Success on for backups. Then run one test backup and check both messages.

Wrapping Up

Set up alerts on both ends. Proxmox VE reports errors on the node, also when the data never reaches the server. The datastore reports each finished backup run with the status of each guest, and it does not need a working mail relay on the node. Check the notification mode of old jobs, test each target, and watch for missing success messages.

Set up datastore notifications

Already a customer? The docs show the channels and the settings for datastore notifications.

Read the notifications docs

Check the notification mode of the job, the matcher and the target. In auto mode, a job with a mailto address uses sendmail, so Postfix must be able to deliver mail. A Sendmail or SMTP target sends nothing to a user without an email address.

Create a matcher with two rules: the field type matches vzdump, and the severity matches error. Select your target under Targets to Notify.

Proxmox VE sets job-id only for backups that run on their schedule. A backup started with Run now has no job-id.

No. The service collects the backup tasks of a datastore into one run. It sends one message when all tasks are finished and more than 5 minutes have passed since the last task ended. The message lists each guest and its status.

No. Proxmox VE and the datastore notifications both report jobs that ran. A missing success message is the signal. Metrics on the age of the last backup can show it on a dashboard.
Bennet Gallein
Bennet Gallein

remote-backups.com operator

Infrastructure enthusiast and founder of remote-backups.com. I build and operate reliable backup infrastructure powered by Proxmox Backup Server, so you can focus on what matters most: your data staying safe.