diff --git a/btrbk b/btrbk index d271c7b..0efabf6 100755 --- a/btrbk +++ b/btrbk @@ -54,6 +54,7 @@ my %compression = ( xz => { name => 'xz', format => 'xz', compress_cmd => [ 'xz', '-c' ], decompress_cmd => [ 'xz', '-d', '-c' ], level_min => 0, level_max => 9, threads => '-T' }, lzo => { name => 'lzo', format => 'lzo', compress_cmd => [ 'lzop', '-c' ], decompress_cmd => [ 'lzop', '-d', '-c' ], level_min => 1, level_max => 9 }, lz4 => { name => 'lz4', format => 'lz4', compress_cmd => [ 'lz4', '-c' ], decompress_cmd => [ 'lz4', '-d', '-c' ], level_min => 1, level_max => 9 }, + zstd => { name => 'zstd', format => 'zst', compress_cmd => [ 'zstd', '-c' ], decompress_cmd => [ 'zstd', '-d', '-c' ], level_min => 1, level_max => 19, threads => '-T' }, ); my $compress_format_alt = join '|', map { $_->{format} } values %compression; # note: this contains duplicate alternations diff --git a/doc/btrbk.conf.5.asciidoc b/doc/btrbk.conf.5.asciidoc index ff0c93c..553cb32 100644 --- a/doc/btrbk.conf.5.asciidoc +++ b/doc/btrbk.conf.5.asciidoc @@ -290,7 +290,7 @@ option in ssh_config(5). remote locations. Defaults to ``no''. If enabled, make sure that '' is available on the source and target hosts. Supported '': gzip, pigz, bzip2, pbzip2, - xz, lzo, lz4. + xz, lzo, lz4, zstd. *stream_compress_level* default|:: Compression level for the specified ''. Refer to @@ -300,7 +300,7 @@ option in ssh_config(5). *stream_compress_threads* default|:: Number of threads to use for . Only supported - for "pigz", "pbzip2" and recent versions of "xz". + for "pigz", "pbzip2", "zstd" and recent versions of "xz". *stream_buffer* |no:: Add a buffer to the btrfs send stream (locally, on uncompressed @@ -565,7 +565,8 @@ Additional options for raw targets: *raw_target_compress* |no:: Compression algorithm to use for raw backup target. Supported - '': gzip, pigz, bzip2, pbzip2, xz, lzo, lz4. + '': gzip, pigz, bzip2, pbzip2, xz, lzo, lz4, + zstd. *raw_target_compress_level* default|:: Compression level for the specified . *raw_target_compress_threads* default|:: diff --git a/ssh_filter_btrbk.sh b/ssh_filter_btrbk.sh index 2ba8144..5240597 100755 --- a/ssh_filter_btrbk.sh +++ b/ssh_filter_btrbk.sh @@ -12,7 +12,7 @@ allow_exact_list= allow_rate_limit=1 allow_stream_buffer=1 allow_compress=1 -compress_list="gzip|pigz|bzip2|pbzip2|xz|lzop|lz4" +compress_list="gzip|pigz|bzip2|pbzip2|xz|lzop|lz4|zstd" # note that the backslash is NOT a metacharacter in a POSIX bracket expression! option_match='-[a-zA-Z0-9=-]+' # matches short as well as long options