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 CC1521FF0B7 for ; Fri, 13 Nov 2026 10:06:19 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 67EAD217FE; Fri, 13 Nov 2026 10:06:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stuttgart.de; s=s1022; t=1794560286; bh=1Km9SYeaikZB5CInMgLfMdfmulJ0TNVl9/2YNDYjCUY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=txJqZllBMrbrUiLUUpEuj8IG0j9pdyRp5t5oBfLMR5UghCtBlt0AHJisF2pMMWZ+r 6NTu7zLZfafdkzmtEwgXAfYOZDfb7A4Y4Xm5U4nfZMTOERWaKqEseTABwy2O8dathr /mjVCp1kr2fpJ+Tz6FSrb2ph+9eSbPrQ4sJu7OtXiyWf0qQ9mLOUwWnqWLwq+iamXM 7Kp/81WCd41a3m3X96GSI6mdfayGOGWMDDvIJD5R/JunNq2zRc6Q7VnFL3AluCyMLX mJKc2U1YDKSSf+57W91VRdZfxkboNxahF+hF/U0+Glb/SCUQJPBv1VDBGC3BWZM/H6 AkxMFKmM5nueA== From: Jakob-Tobias Winter To: pbs-devel@lists.proxmox.com Subject: [RFC PATCH proxmox-backup 07/12] docs: describe snapshot attributes and the tape job attribute filter Date: Fri, 13 Nov 2026 09:56:34 +0100 Message-ID: <20261113085637.57360-10-tobias@stuttgart.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261113085637.57360-3-tobias@stuttgart.de> References: <20261113085637.57360-3-tobias@stuttgart.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.024 Adjusted score from AWL reputation of From: address DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_PASS -0.001 SPF: HELO matches SPF record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 6MN7TVDDYLENV4MER3SDBSUIL7VIR5TG X-Message-ID-Hash: 6MN7TVDDYLENV4MER3SDBSUIL7VIR5TG X-MailFrom: prvs=d19b210678=tobias@stuttgart.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Jakob-Tobias Winter X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Explain what snapshot attributes are, where they are stored and who can read them, which attributes Proxmox VE sets, and how to select backup groups by them in a tape backup job. Signed-off-by: Jakob-Tobias Winter --- docs/pve-integration.rst | 23 +++++++++++++++++++++++ docs/tape-backup.rst | 27 +++++++++++++++++++++++++++ docs/terminology.rst | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+) diff --git a/docs/pve-integration.rst b/docs/pve-integration.rst index e3a91af39..860a34f4e 100644 --- a/docs/pve-integration.rst +++ b/docs/pve-integration.rst @@ -67,3 +67,26 @@ device within the environment (see `Proxmox VE Admin Guide: Backup and Restore `_. +.. _pve_snapshot_attributes: + +Guest Tags and Resource Pool +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When `Proxmox VE`_ backs up a guest, it stores the tags and the resource pool +of the guest as :ref:`attributes ` of the new backup +snapshot: + +* ``pve-tag`` has one value for each tag of the guest. +* ``pve-pool`` has the resource pool of the guest as its value. For a guest in + a nested pool, each parent pool is a value as well: a guest in the pool + ``customers/acme`` has the values ``customers/acme`` and ``customers``. + +The backup server does not interpret these attributes, but they can be used to +select backups. For example, a :ref:`tape backup job ` +can write the guests tagged ``prod`` to another media pool than the remaining +guests. Selecting by a pool also covers the guests of the pools nested in it. + +.. note:: The attributes are stored unencrypted, also for encrypted backups. If + the tags and the resource pool of the guests should not be known to the + backup server, disable the ``pbs-snapshot-attributes`` option of the backup + jobs in Proxmox VE. diff --git a/docs/tape-backup.rst b/docs/tape-backup.rst index a22606909..8ac459235 100644 --- a/docs/tape-backup.rst +++ b/docs/tape-backup.rst @@ -742,6 +742,33 @@ backup. You can specify a single namespace with ``ns`` and a depth with If no `max-depth` is given, it will include all recursive namespaces. +Backup groups can be selected by their :ref:`attributes +` with the ``attribute-filter`` option. For example, +to only include the guests which have the tag ``prod`` in Proxmox VE: + +.. code-block:: console + + # proxmox-tape backup-job update job2 --attribute-filter pve-tag=prod + +A filter matches a group if its value is one of the values the group has for +the key. With several filters, a group is included if at least one of them +matches. Prepend ``exclude:`` to a filter to skip the groups it matches. For +example, to include all guests which are neither tagged ``prod`` nor ``test``: + +.. code-block:: console + + # proxmox-tape backup-job update job3 --attribute-filter exclude:pve-tag=prod \ + --attribute-filter exclude:pve-tag=test + +This allows writing guests to different media pools, depending on their tags or +their resource pool, by using one job for each media pool. + +The attributes of a group are those of its newest snapshot which has +attributes. A newer snapshot without attributes, for example from a client +which does not set them, does not change them. A group which never got +attributes is only included by jobs without a filter or with exclude filters +only. + .. image:: images/screenshots/pbs-gui-tape-backup-jobs-add.png :target: _images/pbs-gui-tape-backup-jobs-add.png :align: right diff --git a/docs/terminology.rst b/docs/terminology.rst index 7ba8910cf..dcac79b31 100644 --- a/docs/terminology.rst +++ b/docs/terminology.rst @@ -130,3 +130,36 @@ As you can see, the time format is RFC3339_ with Coordinated Universal Time (UTC_, identified by the trailing *Z*). +.. _term_snapshot_attributes: + +Snapshot Attributes +------------------- + +A backup snapshot can have attributes. They carry information about the source +of a backup, which the backup server cannot know on its own, and can be used to +select backups, for example in a :ref:`tape backup job +`. An attribute is a key with a list of values. + +.. code-block:: console + :caption: Snapshot Attribute Examples + + pve-tag=prod + pve-tag=web + pve-pool=customer1 + +In this example, the key ``pve-tag`` has the values ``prod`` and ``web``. Each +value is stored on its own, a list of values is never joined into one string. + +A key consists of up to 32 lowercase letters, digits and ``-`` and starts with +a letter. A value consists of up to 128 letters, digits and the characters +``.``, ``_``, ``+``, ``/`` and ``-``. + +The attributes of a snapshot are set by the client after the backup has +finished. Setting them replaces all attributes the snapshot had before. They +are stored in the unprotected part of the manifest, so they are neither signed +nor encrypted. Everyone who is allowed to see a snapshot can read its +attributes, also if the backup itself is encrypted. They are kept when a +snapshot is synced to another datastore or written to tape. + +`Proxmox VE`_ uses attributes to store the tags and the resource pool of a +guest, see :ref:`pve_snapshot_attributes`. -- 2.53.0