Skip to content

Commit

Permalink
Move the bug #12762 reference to an EXAMPLES section
Browse files Browse the repository at this point in the history
  • Loading branch information
asomers committed Jun 22, 2022
1 parent 33e06b6 commit ad713c7
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions man/man8/zstream.8
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ Dumps zfs resume token information
.Cm decompress
.Oo Ar object Ns Sy \&, Ns Ar offset Ns Op Sy \&, Ns Ar type Oc Ns ...
.Xc
Decompress selected records in a ZFS send stream provided on standard input.
This allows recovering a ZFS dataset that was corrupted by OpenZFS bug #12762.
Decompress selected records in a ZFS send stream provided on standard input,
when the compression type recorded in ZFS metadata may be incorrect.
Specify the object number and byte offset of each record that you wish to
decompress.
Optionally specify the compression type.
Expand Down Expand Up @@ -144,6 +144,22 @@ Print summary of converted records.
.El
.El
.
.Sh EXAMPLES
Heal a dataset that was corrupted due to OpenZFS bug #12762.
First, determine which records are corrupt.
That cannot be done automatically; it requires information beyond ZFS's metadata.
If object
.Sy 128
is corrupted at offset
.Sy 0
and is compressed using
.Sy lz4 ,
then run this command:
.Xc
.Bd -literal
.No # Nm zfs Ar send Fl c Ar | Nm zstream decompress Ar 128,0,lz4 | \
Nm zfs recv Ar
.Ed
.Sh SEE ALSO
.Xr zfs 8 ,
.Xr zfs-receive 8 ,
Expand Down

0 comments on commit ad713c7

Please sign in to comment.