[pve-devel] applied: [PATCH manager] vzdump: use configured tmpdir for PBS

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Aug 6 16:06:05 CEST 2020


instead of always using the default hard-coded one.

otherwise, suspend mode container backups might run out of space even
though the admin configured a big enough tmpdir.

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 PVE/VZDump.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index f80faeff..82976aa4 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -742,10 +742,10 @@ sub exec_backup_task {
 
 	$task->{vmtype} = $vmtype;
 
-	if ($self->{opts}->{pbs}) {
-	    $task->{tmpdir} = "/var/tmp/vzdumptmp$$"; #fixme
-	} elsif ($opts->{tmpdir}) {
+	if ($opts->{tmpdir}) {
 	    $task->{tmpdir} = "$opts->{tmpdir}/vzdumptmp$$";
+	} elsif ($self->{opts}->{pbs}) {
+	    $task->{tmpdir} = "/var/tmp/vzdumptmp$$"; #fixme
 	} else {
 	    # dumpdir is posix? then use it as temporary dir
 	    my $info = get_mount_info($opts->{dumpdir});
-- 
2.20.1






More information about the pve-devel mailing list