zdb: Add -O option for -r to specify object-id

"zdb -r -O pool/dataset obj-id destination" will copy
the file with object-id obj-id to the named destination;
without -O it'll still be interpreted as a pathname.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Akash B <akash-b@hpe.com>
Signed-off-by: Sean Eric Fagan <sean.fagan@klarasystems.com>
Closes #16307
This commit is contained in:
Allan Jude
2025-12-18 12:25:09 -05:00
committed by Tony Hutter
parent 0de2da6a37
commit ccb7c82aa1
2 changed files with 19 additions and 3 deletions
+11
View File
@@ -84,6 +84,11 @@
.Op Fl K Ar key
.Ar dataset path destination
.Nm
.Fl r
.Fl O
.Op Fl K Ar key
.Ar dataset object-id destination
.Nm
.Fl R
.Op Fl A
.Op Fl e Oo Fl V Oc Oo Fl p Ar path Oc Ns …
@@ -376,6 +381,12 @@ Specified
.Ar path
must be relative to the root of
.Ar dataset .
When used with
.Fl O ,
the
.Ar path
argument is interpreted as an object identifier,
not a path.
This option can be combined with
.Fl v
for increasing verbosity.