From ad713c78ae89b7d9533fb16f8500dfb79fbf5fa4 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Wed, 22 Jun 2022 11:05:17 -0600 Subject: [PATCH] Move the bug #12762 reference to an EXAMPLES section --- man/man8/zstream.8 | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/man/man8/zstream.8 b/man/man8/zstream.8 index 1c6361191909..36981170eaf7 100644 --- a/man/man8/zstream.8 +++ b/man/man8/zstream.8 @@ -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. @@ -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 ,