Guest without backup jobs as an entry in the Selection mode for new backup popup menu

Fathi

Renowned Member
May 13, 2016
141
9
83
54
Tunis, Tunisia
Hi,
I find it useful that proxmox shows me which guests have no backup job definded.
Could this information be made available to another menu ? When adding a new job, we have four menu items: "include selected VMs, ALL, Exclude selected VMs, Pool base". I think it could be useful to add an entry selecting VMs and containers that doesn't already have a backup job defined, so one wont have any forgotten VM/container with no backup job. Then he could add/substruct other VMs/Containers as needed.
 
  • Like
Reactions: gfngfn256
Hi,

While pvesh get /cluster/backup-info/not-backed-up lists the VM that are not included in any backup job, it does not report VMs that are only included in disabled backup jobs (tested in PVE 8.3.2).
I wonder if this behaviour is intended or if it is an oversight?
 
I wonder if this behavior is intended or if it is an oversight?
It's somewhat "expensive", in API view, to mash together multiple sources of information. I would recommend making two API calls (backup list and VM list) and then cross-check those.

Cheers


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Agreed. Still would be interesting to me if the PVE developers intended it that way. If so, it would be nice if this caveat were mentioned in the API documentation.
 
@jfraf I actually abuse that disabled backup job method to clear the guests without backups :D

But yes, an API/etc. call to see/fetch where VMID are included in backups etc. to report on would be great.
 
The way I stopped having forgotten guests was to flip the job around instead of hunting for the unprotected ones: Selection mode: All, with the few guests I deliberately do not back up under Exclude. New VMs and containers are then covered the day they are created, with no second job to remember. I tag the scratch/test guests so the exclude list is obvious when I come back to it months later.

The same job from the command line (it is what the GUI writes into /etc/pve/jobs.cfg):

vzdump --all 1 --exclude 900,901 --mode snapshot --compress zstd --storage nas-backup --notes-template '{{guestname}} on {{node}}' --notification-mode notification-system

Two things that go with it: leave retention on "use storage defaults" so the keep-* numbers live in one place, and for a single large disk you do not want in the backup (a media volume, say) untick that disk's Backup checkbox rather than excluding the whole guest. The /cluster/backup-info/not-backed-up call then becomes a check that should come back empty, instead of the thing you build the job from.

Disclosure: I wrote a book that covers this job in detail (Never Lose Your Data, https://payhip.com/b/1iHXQ ; there is a free sample chapter on the same page).