]> git.proxmox.com Git - qemu-server.git/commitdiff
support new lzo compression
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 7 Feb 2012 09:40:28 +0000 (10:40 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 7 Feb 2012 09:40:28 +0000 (10:40 +0100)
PVE/VZDump/QemuServer.pm

index 14778f43b7c244740caddf5108a5653302cb12c9..2a0f0320e8634f4af74d93fa6a8799a7d371ecfb 100644 (file)
@@ -372,7 +372,7 @@ sub assemble {
 }
 
 sub archive {
-    my ($self, $task, $vmid, $filename) = @_;
+    my ($self, $task, $vmid, $filename, $comp) = @_;
 
     my $conffile = "$task->{tmpdir}/qemu-server.conf";
 
@@ -396,7 +396,7 @@ sub archive {
     my $cmd = "/usr/lib/qemu-server/vmtar $files";
     my $bwl = $opts->{bwlimit}*1024; # bandwidth limit for cstream
     $cmd .= "|cstream -t $bwl" if $opts->{bwlimit};
-    $cmd .= "|gzip" if $opts->{compress};
+    $cmd .= "|$comp" if $comp;
 
     if ($opts->{stdout}) {
        $self->cmd ($cmd, output => ">&=" . fileno($opts->{stdout}));