public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH v2 proxmox-backup 0/2] Introduce bitflags for overwrite
@ 2023-08-01 10:34 Christian Ebner
  2023-08-01 10:34 ` [pbs-devel] [PATCH v2 proxmox-backup 1/2] fix: #4761: unlink existing entries for hard/symlinks when overwrite Christian Ebner
  2023-08-01 10:34 ` [pbs-devel] [PATCH v2 proxmox-backup 2/2] fix: #4761: introduce overwrite bitflags for fine grained overwrites Christian Ebner
  0 siblings, 2 replies; 6+ messages in thread
From: Christian Ebner @ 2023-08-01 10:34 UTC (permalink / raw)
  To: pbs-devel

When restoring a pxar archive to a target containing preexisting data,
the `overwrite` flag allows to force recreation of file payloads.
However, the current implementation does not allow for symlinks or
hardlinks to be recreated.

These patches introduce the logic to overwrite symlinks and hardlinks
for archive entries, if a directory entry with matching name is already
present on the filesystem. An existing entry is unlinked and the
symlink/hardlink created.

In order to allow a more fine grained control over the overwrite
behaviour, the current overwrite flag is refactored to set all bits
of a newly introduced bitflag. Further, optional parameters for
individual bits controlling the overwriting of files, symlinks and
hardlinks are created.

Christian Ebner (2):
  fix: #4761: unlink existing entries for hard/symlinks when overwrite
  fix: #4761: introduce overwrite bitflags for fine grained overwrites

 pbs-client/src/catalog_shell.rs   |  9 +++-
 pbs-client/src/pxar/extract.rs    | 82 ++++++++++++++++++++++++++-----
 pbs-client/src/pxar/mod.rs        |  2 +-
 proxmox-backup-client/src/main.rs | 28 ++++++++++-
 pxar-bin/src/main.rs              | 32 +++++++++++-
 5 files changed, 135 insertions(+), 18 deletions(-)

-- 
2.39.2





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-08-04 12:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-01 10:34 [pbs-devel] [PATCH v2 proxmox-backup 0/2] Introduce bitflags for overwrite Christian Ebner
2023-08-01 10:34 ` [pbs-devel] [PATCH v2 proxmox-backup 1/2] fix: #4761: unlink existing entries for hard/symlinks when overwrite Christian Ebner
2023-08-04 12:20   ` Wolfgang Bumiller
2023-08-04 12:32     ` Wolfgang Bumiller
2023-08-01 10:34 ` [pbs-devel] [PATCH v2 proxmox-backup 2/2] fix: #4761: introduce overwrite bitflags for fine grained overwrites Christian Ebner
2023-08-04 12:30   ` Wolfgang Bumiller

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