all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dietmar Maurer <dietmar@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [PATCH proxmox-backup 5/5] client: backup: add option to fail on files that cannot be read
Date: Tue,  1 Dec 2026 10:11:11 +0100	[thread overview]
Message-ID: <20261201091111.940190-6-dietmar@proxmox.com> (raw)
In-Reply-To: <20261201091111.940190-1-dietmar@proxmox.com>

A backup leaves out files and directories it cannot read for lack of
permission, and only warns about them. Users who need complete
backups, for example of folders they expect to own entirely, can now
make it fail instead, so an incomplete snapshot never gets stored.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
---
 proxmox-backup-client/src/main.rs | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/proxmox-backup-client/src/main.rs b/proxmox-backup-client/src/main.rs
index e71677633..b4bc54d4e 100644
--- a/proxmox-backup-client/src/main.rs
+++ b/proxmox-backup-client/src/main.rs
@@ -788,6 +788,14 @@ fn spawn_catalog_upload(
                 optional: true,
                 default: false,
             },
+            "fail-on-access-denied": {
+                type: Boolean,
+                description:
+                    "Fail on files and directories that cannot be read for lack of permission, \
+                    instead of leaving them out of the backup with a warning.",
+                optional: true,
+                default: false,
+            },
             "no-cache": {
                 type: Boolean,
                 description: "Bypass local datastore cache for network storages.",
@@ -806,6 +814,7 @@ async fn create_backup(
     change_detection_mode: Option<BackupDetectionMode>,
     dry_run: bool,
     skip_e2big_xattr: bool,
+    fail_on_access_denied: bool,
     no_cache: bool,
     limit: ClientRateLimitConfig,
     _info: &ApiMethod,
@@ -1243,7 +1252,7 @@ async fn create_backup(
                     previous_ref,
                     max_cache_size,
                     on_access_denied: None,
-                    fail_on_access_denied: false,
+                    fail_on_access_denied,
                 };
 
                 let upload_options = UploadOptions {
-- 
2.47.3




      parent reply	other threads:[~2026-12-01  9:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01  9:11 [PATCH proxmox-backup 0/5] client: report or fail on files left out for lack of permission Dietmar Maurer
2026-12-01  9:11 ` [PATCH proxmox-backup 1/5] client: pxar: handle open errors at the call sites Dietmar Maurer
2026-12-01  9:11 ` [PATCH proxmox-backup 2/5] client: pxar: name the directory of an unreadable .pxarexclude Dietmar Maurer
2026-12-01  9:11 ` [PATCH proxmox-backup 3/5] client: pxar: let callers see entries left out for lack of permission Dietmar Maurer
2026-12-01  9:11 ` [PATCH proxmox-backup 4/5] client: pxar: optionally fail on " Dietmar Maurer
2026-12-01  9:11 ` Dietmar Maurer [this message]

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=20261201091111.940190-6-dietmar@proxmox.com \
    --to=dietmar@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal