OS Manuals

/usr/bin/btrfs-image

BTRFS filesystem utilities

From btrfs-progs 7.3-r0 (os), captured 2026-11-05 by running btrfs-image --help (exit 0). permalink

usage: btrfs-image [options] source target

Create or restore a filesystem image (metadata)

Options:
-r                        restore metadump image
-c value                  compression level (0 ~ 9)
-t value                  number of threads (1 ~ 32)
-o                        don't mess with the chunk tree when restoring
-s                        sanitize file names, use once to just use garbage, use twice if you want crc collisions
-w                        walk all trees instead of using extent tree, do this if your extent tree is broken
-m                        restore for multiple devices
-d                        also dump data, conflicts with -w

General:
--version                 print the btrfs-image version, builtin features and exit
--help                    print this help and exit

In the dump mode, source is the btrfs device and target is the output file (use '-' for stdout).
In the restore mode, source is the dumped image and target is the btrfs device/file.
Options (10)
OptionDescriptionSource
-rrestore metadump imagehelp
-c valuecompression level (0 ~ 9)help
-t valuenumber of threads (1 ~ 32)help
-odon't mess with the chunk tree when restoringhelp
-ssanitize file names, use once to just use garbage, use twice if you want crc collisionshelp
-wwalk all trees instead of using extent tree, do this if your extent tree is brokenhelp
-mrestore for multiple deviceshelp
-dalso dump data, conflicts with -whelp
--versionprint the btrfs-image version, builtin features and exithelp
--helpprint this help and exithelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.