public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH v5 proxmox-backup 0/4] fix #2996: client: allow optional match patterns for restore
Date: Wed, 18 Sep 2024 17:27:12 +0200	[thread overview]
Message-ID: <20240918152716.511337-1-c.ebner@proxmox.com> (raw)

This patches implement the api types to allow input validation for
pathpatterns and reuse them in the pxar-bin, the catalog shell as
well as the newly exposed optional restore patterns to the backup
clients restore command.

Patterns are parsed and passed along to the preexisting restore
logic via the `PxarExtractOptions`.

changes since version 4:
- rebased onto current master
- fixed passing patterns via cli for pxar extract

changes since version 3:
- s/matches/patterns for bail message, thanks for testing and
  catching this Gabriel!

changes since version 2:
- added API types as suggested
- reuse same API types for proxmox-backup-client catalog shell and
  restore as well as the pxar extract
- use simple reference instead of `as_slice()` when passing vector of
  patterns

Link to bugtracker issue:
https://bugzilla.proxmox.com/show_bug.cgi?id=2996

Christian Ebner (4):
  api-types: implement dedicated api type for match patterns
  pxar: bin: use dedicated api type for restore pattern
  client: catalog shell: use dedicated api type for patterns
  fix #2996: client: allow optional match patterns for restore

 pbs-api-types/src/lib.rs          |  3 ++
 pbs-api-types/src/pathpatterns.rs | 55 +++++++++++++++++++++++++++++++
 pbs-client/src/catalog_shell.rs   |  7 ++--
 proxmox-backup-client/src/main.rs | 29 +++++++++++++---
 pxar-bin/Cargo.toml               |  1 +
 pxar-bin/src/main.rs              | 26 +++++++--------
 6 files changed, 99 insertions(+), 22 deletions(-)
 create mode 100644 pbs-api-types/src/pathpatterns.rs

-- 
2.39.2



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


             reply	other threads:[~2024-09-18 15:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-18 15:27 Christian Ebner [this message]
2024-09-18 15:27 ` [pbs-devel] [PATCH v5 proxmox-backup 1/4] api-types: implement dedicated api type for match patterns Christian Ebner
2024-09-18 15:27 ` [pbs-devel] [PATCH v5 proxmox-backup 2/4] pxar: bin: use dedicated api type for restore pattern Christian Ebner
2024-09-18 15:27 ` [pbs-devel] [PATCH v5 proxmox-backup 3/4] client: catalog shell: use dedicated api type for patterns Christian Ebner
2024-09-18 15:27 ` [pbs-devel] [PATCH v5 proxmox-backup 4/4] fix #2996: client: allow optional match patterns for restore Christian Ebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240918152716.511337-1-c.ebner@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal