mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-04-29 11:42:38 +00:00
support new lzo compression
This commit is contained in:
parent
ab6b35dfdf
commit
fad02a160f
@ -372,7 +372,7 @@ sub assemble {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub archive {
|
sub archive {
|
||||||
my ($self, $task, $vmid, $filename) = @_;
|
my ($self, $task, $vmid, $filename, $comp) = @_;
|
||||||
|
|
||||||
my $conffile = "$task->{tmpdir}/qemu-server.conf";
|
my $conffile = "$task->{tmpdir}/qemu-server.conf";
|
||||||
|
|
||||||
@ -396,7 +396,7 @@ sub archive {
|
|||||||
my $cmd = "/usr/lib/qemu-server/vmtar $files";
|
my $cmd = "/usr/lib/qemu-server/vmtar $files";
|
||||||
my $bwl = $opts->{bwlimit}*1024; # bandwidth limit for cstream
|
my $bwl = $opts->{bwlimit}*1024; # bandwidth limit for cstream
|
||||||
$cmd .= "|cstream -t $bwl" if $opts->{bwlimit};
|
$cmd .= "|cstream -t $bwl" if $opts->{bwlimit};
|
||||||
$cmd .= "|gzip" if $opts->{compress};
|
$cmd .= "|$comp" if $comp;
|
||||||
|
|
||||||
if ($opts->{stdout}) {
|
if ($opts->{stdout}) {
|
||||||
$self->cmd ($cmd, output => ">&=" . fileno($opts->{stdout}));
|
$self->cmd ($cmd, output => ">&=" . fileno($opts->{stdout}));
|
||||||
|
Loading…
Reference in New Issue
Block a user