Hi,
because of my stupid i deleted all files im home with RM on my raspberry. I switched of the pi immediately and made an image from the whole sd-card. Then i tried to restore the files from the home dir directly from the image but i only could restore file that are 0 bytes big. Testdisk worked perfect so far on nfts partitions. But i have these problems when o try it with ext4. Had the same month ago.
What can i do? Is this limited by the ext4 file system?
Richard
Testdisk restores only 0 byte files from ext4
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
- cgrenier
- Site Admin
- Posts: 5432
- Joined: 18 Feb 2012, 15:08
- Location: Le Perreux Sur Marne, France
- Contact:
Re: Testdisk restores only 0 byte files from ext4
It's a limit (an optimization for fsck) of ext3/ext4. You have to use photorec to recover lost data from ext4.
Re: Testdisk restores only 0 byte files from ext4
I tried it. Now i have a lot of folders called recup_dir.1, recup_dir.2 ... recup_dir.n and the files are named like f<numbers>. photorec can't restore the real folder structure so that i can navigate to the home dir and restore only the needed files?
-
- Posts: 2735
- Joined: 04 Jan 2019, 09:48
- Location: Hannover, Deutschland (Germany, Allemagne)
Re: Testdisk restores only 0 byte files from ext4
No. Photorec is just salvaging on the scrap yard based on the remaining information on the drive. That is what it's for.
You are using it because other information is not available (anymore).
Re: Testdisk restores only 0 byte files from ext4
But how can i find my files in the home dir?
My situation is not really a "scrap yard". i've deleted some files with rm and shutdown the pi directly after that. There is no damaged sd card or anything else.
My situation is not really a "scrap yard". i've deleted some files with rm and shutdown the pi directly after that. There is no damaged sd card or anything else.
-
- Posts: 2735
- Joined: 04 Jan 2019, 09:48
- Location: Hannover, Deutschland (Germany, Allemagne)
Re: Testdisk restores only 0 byte files from ext4
By knowing by heart what has been in the home dir and opening up each found file and checking.
What has been the scope of your search? There is an option to restrict the search to unallocated space.My situation is not really a "scrap yard". i've deleted some files with rm and shutdown the pi directly after that. There is no damaged sd card or anything else.