info > BTRFS-RESTORE

📛 NAME

btrfs-restore - try to restore files from a damaged btrfs filesystem image

🚀 Quick Reference

Use CaseCommandDescription
List subvolume tree rootsbtrfs restore -l <device>📋 List available roots for recovery targeting
Dry run (list recoverable files)btrfs restore -D <device> <path>🔍 Preview what would be restored without writing
Restore files from a specific subvolume rootbtrfs restore -r <rootid> <device> <path>📂 Restore only files under the given subvolume objectid
Restore with metadata (owner, mode, times)btrfs restore -m <device> <path>🔐 Restore file ownership, permissions and timestamps
Restore including snapshotsbtrfs restore -s <device> <path>📸 Also recover snapshot subvolumes (skipped by default)
Restore with extended attributesbtrfs restore -x <device> <path>🏷️ Recover xattr metadata
Restore symbolic linksbtrfs restore -S <device> <path>🔗 Recover symlinks as well as regular files
Ignore errors and continuebtrfs restore -i <device> <path>⚠️ Skip corruptions and attempt to restore remaining data

📖 SYNOPSIS

btrfs restore [options] <device> <path> | -l <device>

📝 DESCRIPTION

btrfs restore is used to try to salvage files from a damaged filesystem and restore them into <path> or just list the subvolume tree roots. The filesystem image is not modified.

If the filesystem is damaged and cannot be repaired by the other tools (btrfs-check(8) or btrfs-rescue(8)), btrfs restore could be used to retrieve file data, as far as the metadata are readable. The checks done by restore are less strict and the process is usually able to get far enough to retrieve data from the whole filesystem. This comes at a cost that some data might be incomplete or from older versions if they're available.

There are several options to attempt restoration of various file metadata type. You can try a dry run first to see how well the process goes and use further options to extend the set of restored metadata.

For images with damaged tree structures, there are several options to point the process to some spare copy.

💡 Note: 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

⚙️ OPTIONS

🌐 Global options

🚪 Exit Status

btrfs restore returns a zero exit status if it succeeds. Non zero is returned in case of failure.

📦 Availability

btrfs is part of btrfs-progs. Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for further details.

📚 SEE ALSO

mkfs.btrfs(8), btrfs-rescue(8), btrfs-check(8)

Btrfs v5.16.2 02/16/2022 BTRFS-RESTORE(8)

BTRFS-RESTORE
📛 NAME 🚀 Quick Reference 📖 SYNOPSIS 📝 DESCRIPTION ⚙️ OPTIONS
🌐 Global options
🚪 Exit Status 📦 Availability 📚 SEE ALSO

Generated by phpman v4.9.26-5-g7740029 Author: Che Dong Under GNU General Public License
2026-08-14 21:21 @2600:1f28:365:80b0:4d23:66fa:c2bb:7bae
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!