btrfs-restore
try to restore files from a damaged btrfs filesystem image
- Provided by: btrfs-tools (Version: 4.4-1ubuntu1.1)
- Report a bug
try to restore files from a damaged btrfs filesystem image
btrfs restore [options] <device> <path> | -l <device>
btrfs restore is used to try to salvage files from a damaged filesystem and restore them into <path> or just list the tree roots.
Since current btrfs-check(8) or btrfs-rescue(8) only has very limited usage, btrfs restore is normally a better choice.
It is recommended to read the following btrfs wiki page if your data is not salvaged with default option: https://btrfs.wiki.kernel.org/index.php/Restore
-s|--snapshots
-x|--xattr
-m|--metadata
-S|--symlinks
-v|--verbose
-i|--ignore-errors
-o|--overwrite
-t <bytenr>
-f <bytenr>
-u|--super <mirror>
-r|--root <rootid>
-d
-l|--list-roots
-D|--dry-run
--path-regex <regex>
^/(|home(|/username(|/Desktop(|/.*))))$
-c
btrfs restore returns a zero exit status if it succeeds. Non zero is returned in case of failure.
btrfs is part of btrfs-progs. Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for further details.