[pbs-devel] [PATCH proxmox-backup] client: align description for backup specification to docs

Christian Ebner c.ebner at proxmox.com
Tue Mar 18 12:11:34 CET 2025


Adapt the description for the backup specification to use
`archive-name` and `type` over `label` and `ext`, to be in line with
the terminology used in the documentation.

Further, explicitley describe the `path` as `source-path` to be less
ambigouos.

In order to avoid formatting issues in the man pages because of line
breaks after a hyphen, show the backup specification description in
multiple lines.

Suggested-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
this patch is a followup based on additional feedback:
https://lore.proxmox.com/pbs-devel/1742224310.w3aml8s8r9.astroid@yuna.none/

 pbs-client/src/backup_specification.rs | 5 +++--
 proxmox-backup-client/src/main.rs      | 7 ++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/pbs-client/src/backup_specification.rs b/pbs-client/src/backup_specification.rs
index e44d23d90..e530d1976 100644
--- a/pbs-client/src/backup_specification.rs
+++ b/pbs-client/src/backup_specification.rs
@@ -8,8 +8,9 @@ const_regex! {
 }
 
 pub const BACKUP_SOURCE_SCHEMA: Schema = StringSchema::new(
-    "Backup source specification ([<label>:<path>]), the specification \
-    'label' must contain alphanumerics, hyphens and underscores only.",
+    "Backup source specification ([<archive-name>.<type>:<source-path>]), the \
+    'archive-name' must contain alphanumerics, hyphens and underscores only. \
+    The 'type' must be either 'pxar', 'img', 'conf' or 'log'.",
 )
 .format(&ApiStringFormat::Pattern(&BACKUPSPEC_REGEX))
 .schema();
diff --git a/proxmox-backup-client/src/main.rs b/proxmox-backup-client/src/main.rs
index 7fa57b2f8..a7bd4154a 100644
--- a/proxmox-backup-client/src/main.rs
+++ b/proxmox-backup-client/src/main.rs
@@ -632,9 +632,10 @@ fn spawn_catalog_upload(
             backupspec: {
                 type: Array,
                 description:
-                    "List of backup source specifications ([<label.ext>:<path>] ...), the \
-                    specifications 'label' must contain alphanumerics, hyphens and underscores \
-                    only.",
+                    "List of backup source specifications:\
+                    \n\n[<archive-name>.<type>:<source-path>] ...\n\n\
+                    The 'archive-name' must only contain alphanumerics, hyphens and underscores \
+                    while the 'type' must be either 'pxar', 'img', 'conf' or 'log'.",
                 items: {
                     schema: BACKUP_SOURCE_SCHEMA,
                 }
-- 
2.39.5





More information about the pbs-devel mailing list