Signed-off-by: Filip Schauer <f.scha...@proxmox.com> --- PVE/VZDump.pm | 7 +++++++ www/manager6/form/BackupCompressionSelector.js | 1 + 2 files changed, 8 insertions(+)
diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index 06a887a3..0b99f88d 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm @@ -872,6 +872,13 @@ sub compressor_info { } else { return ('gzip --rsyncable', 'gz'); } + } elsif ($opt_compress eq 'xz') { + my $xz_threads = $opts->{xz} // 1; + if ($xz_threads == 0) { + my $cpuinfo = PVE::ProcFSTools::read_cpuinfo(); + $xz_threads = int(($cpuinfo->{cpus} + 1)/2); + } + return ("xz --threads=$xz_threads", 'xz'); } elsif ($opt_compress eq 'zstd') { my $zstd_threads = $opts->{zstd} // 1; if ($zstd_threads == 0) { diff --git a/www/manager6/form/BackupCompressionSelector.js b/www/manager6/form/BackupCompressionSelector.js index df2091f3..355b7880 100644 --- a/www/manager6/form/BackupCompressionSelector.js +++ b/www/manager6/form/BackupCompressionSelector.js @@ -5,6 +5,7 @@ Ext.define('PVE.form.BackupCompressionSelector', { ['0', Proxmox.Utils.noneText], ['lzo', 'LZO (' + gettext('fast') + ')'], ['gzip', 'GZIP (' + gettext('good') + ')'], + ['xz', 'XZ (' + gettext('slow but very good') + ')'], ['zstd', 'ZSTD (' + gettext('fast and good') + ')'], ['bzip2', 'BZIP2 (' + gettext('good') + ')'], ], -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel