]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage.pm
Fix: #2124 storage: add zstd support
[pve-storage.git] / PVE / Storage.pm
index 0b2745eecfeb97e647f6f6746455f4002f543390..87550b14360eade1ac15a5de96272b3e64ab2e3a 100755 (executable)
@@ -1366,10 +1366,12 @@ sub decompressor_info {
        tar => {
            gz => ['tar', '-z'],
            lzo => ['tar', '--lzop'],
+           zst => ['tar', '--zstd'],
        },
        vma => {
            gz => ['zcat'],
            lzo => ['lzop', '-d', '-c'],
+           zst => ['zstd', '-q', '-d', '-c'],
        },
     };
 
@@ -1460,7 +1462,7 @@ sub extract_vzdump_config_vma {
        my $errstring;
        my $err = sub {
            my $output = shift;
-           if ($output =~ m/lzop: Broken pipe: <stdout>/ || $output =~ m/gzip: stdout: Broken pipe/) {
+           if ($output =~ m/lzop: Broken pipe: <stdout>/ || $output =~ m/gzip: stdout: Broken pipe/ || $output =~ m/zstd: error 70 : Write error : Broken pipe/) {
                $broken_pipe = 1;
            } elsif (!defined ($errstring) && $output !~ m/^\s*$/) {
                $errstring = "Failed to extract config from VMA archive: $output\n";