From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id A78541FF0C2 for ; Thu, 03 Dec 2026 10:59:07 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id D083721790; Thu, 03 Dec 2026 10:58:49 +0100 (CET) From: POYEN Alexis To: pve-devel@lists.proxmox.com Subject: [RFC PATCH guest-common/manager 0/4] vzdump: support tag based guest selection in backup jobs Date: Thu, 3 Dec 2026 10:27:06 +0100 Message-ID: <20261203092717.1863218-1-alexis.poyen@groupe-cyllene.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 1 DMARC_PASS -0.1 DMARC pass policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RDNS_NONE 1.274 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record X-MailFrom: alexis.poyen@groupe-cyllene.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation Message-ID-Hash: C4AL6NRQ4LLZBWL7BYYHUMJ6XBBHAIVZ X-Message-ID-Hash: C4AL6NRQ4LLZBWL7BYYHUMJ6XBBHAIVZ X-Mailman-Approved-At: Thu, 03 Dec 2026 10:58:46 +0100 CC: POYEN Alexis X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This is an RFC for bug #4186 (tag based selection of guests in backup jobs). I would like to get feedback on the approach before turning this into a proper series. Backup jobs currently select the guests to back up either by an explicit list of VMIDs, by all guests (optionally with an exclude list), or by a resource pool. This series adds a fourth selection mode: all guests that carry at least one of a given set of tags. Tags are already a first-class property of guests (resource tree "Tag View", bulk actions, create wizards), but there is no way to drive a backup job from them. Selecting by tag lets one back up a logical group of guests (e.g. "prod", "db") without maintaining a pool or a VMID list that drifts as guests are added or removed. The new 'tags' option is mutually exclusive with the existing selection modes ('vmid', 'all'/'exclude', 'pool'), consistent with how those already exclude each other. Design question --------------- In the forum thread [1] Thomas Lamprecht suggested not to add yet another selection mode, but to rework the whole selection in the spirit of the bulk-action filters, implemented in the backend and re-usable for other endpoints. I understand that is the longer-term direction, but it is a much larger change. This series takes the smaller step: a dedicated 'tags' option that follows the existing selection modes. It is self-contained, easy to review, and solves the reported use case. If the maintainers prefer to wait for the filter-based rework, I am happy to drop it; if a dedicated option is acceptable in the meantime, I will turn this into a proper series. [1] https://forum.proxmox.com/threads/suggestion-add-tags-based-selection-mode-in-backup-job.137038/ The change spans two repositories: - pve-guest-common: declares the 'tags' option in the vzdump schema - pve-manager: implements the selection, the API handling and the GUI The pve-manager patches depend on the pve-guest-common patch. POYEN Alexis (4): close #4186: vzdump: add 'tags' option to select guests by tag close #4186: vzdump: select guests by tag close #4186: api: backup: support tag based guest selection in jobs close #4186: ui: backup: add tag based selection mode PVE/API2/Backup.pm | 8 +++++ PVE/VZDump.pm | 31 ++++++++++++++++- src/PVE/VZDump/Common.pm | 7 +++++ test/vzdump_guest_included_test.pl | 71 +++++++++++++++++++++++++++++++++++++- www/manager6/Utils.js | 4 +++ www/manager6/dc/Backup.js | 21 +++++++++++ 6 files changed, 140 insertions(+), 2 deletions(-) -- 2.53.0