client: align description for backup specification to docs

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@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
Christian Ebner 2025-03-18 12:11:34 +01:00 committed by Thomas Lamprecht
parent b693f5d471
commit 24a6d4fd82
2 changed files with 7 additions and 5 deletions

View File

@ -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();

View File

@ -631,9 +631,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,
}