public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	Hannes Laimer <h.laimer@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup v3 1/3] fix #6195: api: datastore: add endpoint for moving namespaces
Date: Mon, 15 Sep 2025 10:16:05 +0200	[thread overview]
Message-ID: <842c5799-8b2e-4386-8d70-1614f6409df9@proxmox.com> (raw)
In-Reply-To: <20250911094943.34300-2-h.laimer@proxmox.com>

Thanks for having a go at this issue, I did not yet have an in depth 
look at this but unfortunately I'm afraid the current implementation 
approach will not work for the S3 backend (and might also have issues 
for local datastores).

Copying the S3 objects is not an atomic operation and  will take some 
time, so leaves you open for race conditions. E.g. while you copy 
contents, a new backup snapshot might be created in one of the already 
copied backup groups, which will then however be deleted afterwards. 
Same is true for pruning, and other metadata editing operations such as
adding notes, backup task logs, ecc.

So IMO this must be tackled on a group level, making sure to get an 
exclusive lock for each group (on the source as well as target of the 
move operation) before doing any manipulation. Only then it is okay to 
do any non-atomic operations.

The moving of the namespace must then be implemented as batch operations 
on the groups and sub-namespaces.

This should be handled the same also for regular datastores, to avoid 
any races there to.


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


  reply	other threads:[~2025-09-15  8:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-11  9:49 [pbs-devel] [PATCH proxmox-backup v3 0/3] fixes #6195: add support " Hannes Laimer
2025-09-11  9:49 ` [pbs-devel] [PATCH proxmox-backup v3 1/3] fix #6195: api: datastore: add endpoint " Hannes Laimer
2025-09-15  8:16   ` Christian Ebner [this message]
2025-09-15  8:27     ` Hannes Laimer
2025-09-15  8:56       ` Christian Ebner
2025-09-15  9:19         ` Hannes Laimer
2025-09-15 10:01           ` Christian Ebner
2025-09-15 10:32             ` Hannes Laimer
2025-09-11  9:49 ` [pbs-devel] [PATCH proxmox-backup v3 2/3] fix #6195: ui: add button/window for moving a namespace Hannes Laimer
2025-09-11  9:49 ` [pbs-devel] [PATCH proxmox-backup v3 3/3] docs: add section for moving datastores Hannes Laimer

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=842c5799-8b2e-4386-8d70-1614f6409df9@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=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