4 .\" The contents of this file are subject to the terms of the
5 .\" Common Development and Distribution License (the "License").
6 .\" You may not use this file except in compliance with the License.
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 .\" or https://opensource.org/licenses/CDDL-1.0.
10 .\" See the License for the specific language governing permissions
11 .\" and limitations under the License.
13 .\" When distributing Covered Code, include this CDDL HEADER in each
14 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 .\" If applicable, add the following below this CDDL HEADER, with the
16 .\" fields enclosed by brackets "[]" replaced with your own identifying
17 .\" information: Portions Copyright [yyyy] [name of copyright owner]
21 .\" Copyright (c) 2020 by Delphix. All rights reserved.
29 .Nd manipulate ZFS send streams
38 .Op Ar object Ns Sy \&, Ns Ar offset Ns Op Sy \&, Ns Ar type Ns ...
54 utility manipulates ZFS send streams output by the
64 Print information about the specified send stream, including headers and
66 The send stream may either be in the specified
68 or provided on standard input.
71 Suppress the validation of checksums.
74 Print metadata for each record.
76 Dump data contained in each record.
82 alias is provided for compatibility and is equivalent to running
90 Dumps zfs resume token information
95 .Op Ar object Ns Sy \&, Ns Ar offset Ns Op Sy \&, Ns Ar type Ns ...
97 Decompress selected records in a ZFS send stream provided on standard input,
98 when the compression type recorded in ZFS metadata may be incorrect.
99 Specify the object number and byte offset of each record that you wish to
101 Optionally specify the compression type.
102 Valid compression types include
112 Every record for that object beginning at that offset will be decompressed, if
114 It may not be possible, because the record may be corrupted in some but not
115 all of the stream's snapshots.
116 Specifying a compression type of
118 will change the stream's metadata accordingly, without attempting decompression.
119 This can be useful if the record is already uncompressed but the metadata
121 The repaired stream will be written to standard output.
125 Print summary of decompressed records.
133 Deduplicated send streams can be generated by using the
136 The ability to send deduplicated send streams is deprecated.
137 In the future, the ability to receive a deduplicated send stream with
140 However, deduplicated send streams can still be received by utilizing
141 .Nm zstream Cm redup .
145 command is provided a
147 containing a deduplicated send stream, and outputs an equivalent
148 non-deduplicated send stream on standard output.
149 Therefore, a deduplicated send stream can be received by running:
150 .Dl # Nm zstream Cm redup Pa DEDUP_STREAM_FILE | Nm zfs Cm receive No …
154 Print summary of converted records.
162 Recompresses a send stream, provided on standard input, using the provided
163 algorithm and optional level, and writes the modified stream to standard output.
164 All WRITE records in the send stream will be recompressed, unless they fail
165 to result in size reduction compared to being left uncompressed.
166 The provided algorithm can be any valid value to the
169 Note that encrypted send streams cannot be recompressed.
172 Specifies compression level.
173 Only needed for algorithms where the level is not implied as part of the name
174 of the algorithm (e.g. gzip-3 does not require it, while zstd does, if a
175 non-default level is desired).
180 Heal a dataset that was corrupted due to OpenZFS bug #12762.
181 First, determine which records are corrupt.
182 That cannot be done automatically; it requires information beyond ZFS's
186 is corrupted at offset
188 and is compressed using
190 then run this command:
192 .No # Nm zfs Ar send Fl c Ar … | Nm zstream decompress Ar 128,0,lz4 | \
199 .Lk https://github.com/openzfs/zfs/issues/12762