btrfs-restore
Salvage files from a damaged btrfs filesystem
TLDR
Restore all files from a btrfs device
SYNOPSIS
btrfs restore [options] device target
DESCRIPTION
btrfs restore attempts to salvage files from a damaged btrfs filesystem that cannot be mounted normally. It reads filesystem structures directly from the device and copies recoverable files to a target directory.
This is a data recovery tool for when other methods fail. It does not repair the filesystem; it extracts data to a healthy location.
PARAMETERS
-D, --dry-run
List files without extracting--path-regex regex
Only restore files matching pattern-c
Case-insensitive regex matching-t bytenr
Use specific root tree (see btrfs-find-root)-m, --metadata
Restore metadata (permissions, times)-x, --xattr
Restore extended attributes-S, --symlinks
Restore symbolic links-o, --overwrite
Overwrite existing files in target-v
Verbose output
CAVEATS
Does not fix the filesystem; only extracts data. May not recover all files from severely damaged filesystems. Regex must match full path including parent directories. Target directory should be on a different filesystem.
SEE ALSO
btrfs(8), btrfs-rescue(8), btrfs-check(8)
