Re: btrfs restore corrupt file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jorge Bastos posted on Wed, 22 Nov 2017 19:18:59 +0000 as excerpted:

> Hello,
> 
> While doing btrfs checksum testing I purposely corrupted a file and got
> the expect I/O error when trying to copy it, I also tested btrfs restore
> to see if I could recover a known corrupt file and it did copy it but
> there was no checksum error or warning. I used btrfs restore -v
> 
> Is this expect behavior or should restore warn about checksum failures?
> 
> Kernel used was 4.13.13,  btrfs-progs v4.13.2

AFAIK it's expected.  The purpose of btrfs restore, after all, is to try 
to get at least some files back from a filesystem that is generally 
damaged and unable to mount, so acceptance of some possible damage to 
restored files as a tradeoff for being able to restore them *at* *all* is 
assumed.  It's not /supposed/ to be a substitute for having a proper 
backup in the first place, only something to try in case there was no 
backup and getting back a damaged file is better than getting back no 
file, or in case there was a backup, but it wasn't current, in which case 
the restored files can be verified against the backup, and those that 
differ can be examined to see if the difference is due to legitimate 
change, or corruption.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux