[pve-devel] [RFC container v3 29/34] external restore: don't use 'one-file-system' tar flag when restoring from a directory

Fiona Ebner f.ebner at proxmox.com
Thu Nov 7 17:51:41 CET 2024


This gives backup providers more freedom, e.g. mount backed-up mount
point volumes individually.

Suggested-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---

New in v3.

 src/PVE/LXC/Create.pm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/PVE/LXC/Create.pm b/src/PVE/LXC/Create.pm
index 8657ac1..719f372 100644
--- a/src/PVE/LXC/Create.pm
+++ b/src/PVE/LXC/Create.pm
@@ -167,11 +167,15 @@ sub restore_external_archive {
 		or die "did not get path to archive directory from backup provider\n";
 	    die "not a directory '$directory'" if !-d $directory;
 
+	    # Give backup provider more freedom, e.g. mount backed-up mount point volumes
+	    # individually.
+	    my @flags = grep { $_ ne '--one-file-system' } @PVE::Storage::Plugin::COMMON_TAR_FLAGS;
+
 	    my $create_cmd = [
 		'tar',
 		'cpf',
 		'-',
-		@PVE::Storage::Plugin::COMMON_TAR_FLAGS,
+		@flags,
 		"--directory=$directory",
 		'.',
 	    ];
-- 
2.39.5





More information about the pve-devel mailing list