]> git.proxmox.com Git - pve-manager.git/commitdiff
fix bug #719: vzdump - only call cleanup after prepare
authorDietmar Maurer <dietmar@proxmox.com>
Sat, 3 Oct 2015 13:30:45 +0000 (15:30 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Sat, 3 Oct 2015 13:30:45 +0000 (15:30 +0200)
PVE/VZDump.pm

index 98516462bc0d30df3d0bc54e0b2d8171655d9df2..ffa7db8350cc37af4d5c3104e91b839299c43127 100644 (file)
@@ -1068,8 +1068,11 @@ sub exec_backup_task {
            warn $@ if $@;
        }
 
-       eval { $plugin->cleanup ($task, $vmid) };
-       warn $@ if $@;
+       if (defined($task->{mode})) { 
+           # only call cleanup when necessary (when prepare was executed)
+           eval { $plugin->cleanup ($task, $vmid) };
+           warn $@ if $@;
+       }
 
        eval { $plugin->set_logfd (undef); };
        warn $@ if $@;