public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Hannes Laimer <h.laimer@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [PATCH proxmox-backup] datastore: don't skip empty namespaces on s3 refresh
Date: Wed,  4 Mar 2026 11:39:38 +0100	[thread overview]
Message-ID: <20260304103938.42167-1-h.laimer@proxmox.com> (raw)

Without this empty namespaces present on s3 won't be visible locally.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
 pbs-datastore/src/datastore.rs | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs
index 7ad3d917..4749319a 100644
--- a/pbs-datastore/src/datastore.rs
+++ b/pbs-datastore/src/datastore.rs
@@ -2535,6 +2535,15 @@ impl DataStore {
                     format!("failed to strip store context prefix {store_prefix} for {object_key}")
                 })?;
                 if object_path.ends_with(NAMESPACE_MARKER_FILENAME) {
+                    // Ensure the marker's parent directory exists so the namespace is visible locally
+                    let ns_dir = tmp_base.join(object_path);
+                    if let Some(parent) = ns_dir.parent() {
+                        proxmox_sys::fs::create_path(
+                            parent,
+                            Some(dir_create_options),
+                            Some(dir_create_options),
+                        )?;
+                    }
                     continue;
                 }
 
-- 
2.47.3





             reply	other threads:[~2026-03-04 10:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04 10:39 Hannes Laimer [this message]
2026-03-04 14:19 ` 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=20260304103938.42167-1-h.laimer@proxmox.com \
    --to=h.laimer@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