Proxmox VE 9 + PBS: shutdown PBS after backup job completion (global ALL VMs job)

blackice2004

New Member
Dec 12, 2025
1
0
1
Hello,

I’m trying to build a clean backup workflow with Proxmox VE 9 and Proxmox Backup Server, but I’m stuck.

Environment:
- Proxmox VE 9.1.x
- Proxmox Backup Server on a separate physical host
- PBS added as storage (type: pbs)
- Backup job: Datacenter -> Backup (vzdump)
- Backup covers ALL VMs and containers (option all 1, not individual VM/CT jobs)
- PBS is powered on via Wake-on-LAN from OpenWrt (this part works reliably)

Goal:
I want this workflow:
- PBS is powered on (WOL)
- Proxmox VE runs a backup job for ALL VMs and containers
- After the backup job really finishes (and PBS background tasks are done)
- PBS shuts down automatically

Important note:
- Using a fixed timer (cron shutdown after X minutes) is NOT acceptable
- Backup duration is unpredictable (sometimes 10 minutes, sometimes much longer)

What I already tried:

1) Backup job hookscript
In jobs.cfg I configured:
- hookscript local:snippets/pbs_shutdown_only.sh

The script is executable, tested manually, and logs to syslog using logger.

Result:
- Backup runs successfully
- PBS receives backups correctly
- hookscript is NOT executed at all
- no output in task log
- no journal/syslog entries from the script
- not triggered on job start or job end

2) Verified job configuration
- Job exists and runs correctly
- Storage is PBS
- Backup is successful
- hookscript is silently ignored

3) Tried vzdump helper scripts (/usr/libexec/vzdump-*)
- Script runs
- But there is no reliable "backup job finished" event
- Not suitable for safe PBS shutdown

Additional info:
- SSH root access from PVE to PBS works
- WOL works
- PBS network and power settings are correct
- Backup of ALL VMs/containers finishes without errors

It looks like in Proxmox VE 9:
- hookscript is not executed for PBS backup jobs
- there is no reliable hook/event for PBS backup job completion
- this is especially problematic when using a single global job (all 1)

Questions:
1. Is this expected behavior in Proxmox VE 9?
2. Is there any supported way to detect when a PBS backup job has fully finished?
3. Has anyone implemented a reliable PBS auto-shutdown workflow with PVE 9?
4. Is it possible to do this cleanly from the PVE side, without cron-based timers?

Thanks.