Hi folksIs there possible to recover deleted files in ext4 filesystem? --------------------------------
On 26/10/2024 02:03, Hans wrote:
Am Freitag, 25. Oktober 2024, 20:32:29 CEST schrieb louletian@sina.com:
Hi folksIs there possible to recover deleted files in ext4 filesystem?
Try extundelete.[...]
Using an image, you can try nice tools like foremost, scalpel or autopsy to recover files.
Also you can use CAINE, KALI or DEFT (these are forensis suites) for data recovery.
Have you tried these tools in action? I believe that removing files from
ext4 wipes list of used blocks and explicitly zeroes size in inode records, so a chance of recovery is quite low. Some info for recently accessed files may be restored from filesystem journal. In the case of contiguous block spans signature-based search (e.g. photorec from the testdisk package) may find some files, but they will be buried in the heap of false positives without any hints related to file names and directory structures.
Have you tried these tools in action? I believe that removing files from
ext4 wipes list of used blocks and explicitly zeroes size in inode
records, so a chance of recovery is quite low. Some info for recently accessed files may be restored from filesystem journal. In the case of contiguous block spans signature-based search (e.g. photorec from the testdisk package) may find some files, but they will be buried in the
heap of false positives without any hints related to file names and
directory structures.
I am quite skeptical concerning fraction of successfully recovered files.
Thank you for the detailed answer.
I have tried ext4magic. My impression is that it might have an issue
with reading journal and that it is unnecessary strict walking through
inodes (zeroing invalidates checksums if I remember it correctly). It
may restore some files, however I can not figure out what approach extundelete or other tools may use to noticeably improve success rate
since important data is overwritten.
I was very successfull with photorec and autopsy.
Does autopsy/sleuthkit use some heuristic that allows to restore significantly more data than extundelete and photorec in the case of unintentional removing of directories?
Last time I had to revover 2 TB music files for a friend, and photorec
gave me all files back.
Of course, a few MB size files with reach metadata (audio, image, zip)
is an optimal case for photorec and foremost. For 1 hour long .mp3 files fragmentation causes recovery of only some parts of files (at least in
the case of FAT32).
Also foremost is another tool of my favourites, as it is easy to use.
I am curious what are cases when it may perform noticeably better than photorec.
Sorry, I was unclear. I mean fair probability to recover files in the
range of 1-5 MB each, but large files (50-200 MB or more) may be
troublesome. The tool limitation is contiguous span of blocks. A disk dedicated to music collection is a much easier case than e.g. mix of
files having wide range of types and sizes in home directories.
Even very big files should not be the problem, because, when the header is found all date until the footer are the file.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 02:28:36 |
Calls: | 10,385 |
Calls today: | 2 |
Files: | 14,057 |
Messages: | 6,416,582 |