Are Files Recovered with btrfs restore Bit-Perfect? How to Check Before You Trust Them

Abstract: A completed btrfs restore run proves that data was found — not that it matches the last version before deletion. Recovered files can be partial or stale, so verify them before relying on them.

Created: 2026-11-02 by

No — a finished btrfs restore run, whether you invoked it directly or through an undelete helper script, is not a guarantee that the recovered file is byte-for-byte identical to the version you deleted. The result can be perfectly intact, partially recovered, or an older revision of the file. The tool is designed for salvage, not for certified recovery, so treat every restored file as unverified until you have actually checked it.

What a successful restore actually proves

btrfs restore bypasses the normal mount path. It walks filesystem trees directly from the device and copies file contents out to a destination directory. That makes it useful both for damaged filesystems and for fishing deleted files out of older tree roots. But because it operates in salvage mode, its consistency checks are deliberately looser than a normal mount would be, and its own documentation warns that it can retrieve data that is incomplete or belongs to an earlier version of the file.

A clean exit therefore tells you three things: metadata for the path was found, at least some extents were readable, and the tool finished. It tells you nothing about whether those extents still contain the bytes you last wrote. Seeing the correct filename next to a nonempty file is encouraging, but it is not an integrity check.

Three ways a recovered file can differ from the original

  1. Overwritten extents. Deleting a file frees its data extents for reuse. Any write that happens afterward — by the system, by another recovery attempt, or by the recovery tool itself — can consume those blocks. What comes back is then zeros or fragments of unrelated data stitched into your file.
  2. An older revision. Undelete tooling for btrfs typically locates previous tree roots left on disk and points restore at them, because the current tree no longer references the deleted file. The content you get is the state as of that older tree, which may lag your last save by minutes or weeks. A perfectly readable but outdated file is a real and common outcome.
  3. Errors skipped silently. Some recovery wrappers invoke btrfs restore -i, where -i means "ignore errors and keep going" — and then discard the tool's output entirely, counting nonempty destination files as their success metric. That count says nothing about content. If you use such a script, at least capture the log:
btrfs restore -v --path-regex '^/home/user/\.config/.*$' /dev/sdb2 /mnt/rescue/out 2>&1 | tee restore.log

Reading what the tool complained about tells you far more than a file tally ever will.

How to verify a recovered file

If you have a reference copy

The only true proof of bit-level fidelity is comparison against a known-good version of the same pre-deletion file — a backup, a synced copy, an attachment you emailed yourself. Both cmp and a checksum pair will settle the question:

sha256sum recovered/memcard.ps2 backup/memcard.ps2
cmp recovered/memcard.ps2 backup/memcard.ps2 && echo identical

If the hashes match, you are done.

If you have no reference

Preserve the recovered file untouched and run your checks on a copy. Start with cheap sanity checks: a standard PCSX2 memory-card image is a fixed size, so a recovered file shorter than expected is almost certainly truncated. Then test the copy in the application itself — confirm the card is recognized, the save list appears, and the saves you actually need load without errors. Understand what this proves: it demonstrates that the saves present are usable, not that every byte of the card survived or that your most recent progress is on it. A clean, readable file from last month can pass every one of these tests.

Limiting further damage while you work

  • Stop writing to the affected filesystem immediately. Every write is a chance to overwrite the freed extents you are trying to salvage. If practical, remount it read-only:
mount -o remount,ro /mountpoint
  • Put the recovery output somewhere else. btrfs restore never writes to the source device, but if the destination lives on the same filesystem, its own allocations can consume the very blocks you are recovering. Use a different disk.
  • Keep the first result. Once you have a recovery attempt, copy it off and never let a subsequent run overwrite it.

Preventing the next scare

The cleanest fix is making recovery unnecessary. On btrfs, scheduled snapshots (via tools like snapper or timeshift) give you near-instant rollback points at trivial cost. Pair them with periodic backups to a separate device — btrfs send/receive between filesystems, or a file-level tool such as borg or restic — and keep one copy off the machine. For game saves specifically, backing up the memory-card images is small and cheap, and it converts a nerve-wracking salvage operation into a two-minute copy job. Shell hygiene helps too: quote variables, preview destructive commands with echo, and consider a trash utility instead of bare rm.

Frequently Asked Questions

Does btrfs restore verify data checksums?

Btrfs normally verifies checksums on every ordinary read, but restore is a salvage tool: depending on the version and flags, it reports or tolerates checksum problems rather than refusing output, and a flag exists to keep going past them. Even a checksum-clean read only proves that a block matches its recorded checksum — not that you recovered the newest version or every extent.

Will restore give me the latest version of the file?

Not necessarily. A default run reads the current trees, in which a deleted file no longer appears; undelete approaches work by walking older tree roots found on disk. The content you get reflects whichever tree was used, so staleness is a built-in possibility.

A script reported "N files recovered" — is that an integrity check?

No. Typical wrappers count nonempty files in the destination directory. That confirms files were written out, not that their contents are complete, current, or correct. Check the tool's log output instead, and verify the files themselves.

How likely is corruption in a recovered file?

There is no universal probability. The outcome depends on how much writing occurred after deletion, where the extents landed, filesystem layout, and how stale the tree used for recovery was. An intact older file and a partially mangled one are both plausible results, and finding the file does not distinguish between them.

Can I start using the recovered memory card directly?

Test a copy first, never the original. If the copy works in the emulator, continue working from further copies and export or back up the saves you care about. This keeps one pristine image available if a later problem appears.

What is the single most important rule during recovery?

Minimize writes. Halt activity on the affected filesystem, remount it read-only if you can, and direct all recovery output to a different disk. Everything else about recovery quality flows from how much of the freed data is still physically present when you read it.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More