summaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorPaul Dagnelie <[email protected]>2022-11-10 15:23:46 -0800
committerGitHub <[email protected]>2022-11-10 15:23:46 -0800
commit9f4ede63d23be4f43ba8dd0ca42c6a773a8eaa8d (patch)
tree88b62f576845104fb49b7f17af4172ff8c1dcd72 /man
parente9ab9e512c277ce3c22208599ebe5814db41a036 (diff)
Add ability to recompress send streams with new compression algorithm
As new compression algorithms are added to ZFS, it could be useful for people to recompress data with new algorithms. There is currently no mechanism to do this aside from copying the data manually into a new filesystem with the new algorithm enabled. This tool allows the transformation to happen through zfs send, allowing it to be done efficiently to remote systems and in an incremental fashion. A new zstream command is added that decompresses WRITE records and then recompresses them with a provided algorithm, and then re-emits the modified send stream. It may also be possible to re-compress embedded block pointers, but that was not attempted for the initial version. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Matthew Ahrens <[email protected]> Signed-off-by: Paul Dagnelie <[email protected]> Closes #14106
Diffstat (limited to 'man')
-rw-r--r--man/man8/zstream.825
1 files changed, 25 insertions, 0 deletions
diff --git a/man/man8/zstream.8 b/man/man8/zstream.8
index bfe7ac3f6..c09a20ad2 100644
--- a/man/man8/zstream.8
+++ b/man/man8/zstream.8
@@ -43,6 +43,10 @@
.Nm
.Cm token
.Ar resume_token
+.Nm
+.Cm recompress
+.Op Fl l Ar level
+.Ar algorithm
.
.Sh DESCRIPTION
The
@@ -149,6 +153,27 @@ Therefore, a deduplicated send stream can be received by running:
Verbose.
Print summary of converted records.
.El
+.It Xo
+.Nm
+.Cm recompress
+.Op Fl l Ar level
+.Ar algorithm
+.Xc
+Recompresses a send stream, provided on standard input, using the provided
+algorithm and optional level, and writes the modified stream to standard output.
+All WRITE records in the send stream will be recompressed, unless they fail
+to result in size reduction compared to being left uncompressed.
+The provided algorithm can be any valid value to the
+.Nm compress
+property.
+Note that encrypted send streams cannot be recompressed.
+.Bl -tag -width "-l"
+.It Fl l Ar level
+Specifies compression level.
+Only needed for algorithms where the level is not implied as part of the name
+of the algorithm (e.g. gzip-3 does not require it, while zstd does, if a
+non-default level is desired).
+.El
.El
.
.Sh EXAMPLES