How do I recover missing files on an ext3 hard drive?

We have a Linux computer that lost power, without being powered down properly. Its now missing a critical directory, containing about 1000 critical files.

How would I recover that data?
Risky101Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
NYCmitch25Connect With a Mentor Commented:
*** BAD NEWS! ***

Q: How can I recover (undelete) deleted files from my ext3 partition?
Actually, you can't! This is what one of the developers, Andreas Dilger, said about it:
In order to ensure that ext3 can safely resume an unlink after a crash, it actually zeros out the block pointers in the inode, whereas
ext2 just marks these blocks as unused in the block bitmaps and marks the inode as "deleted" and leaves the block pointers alone.

Your only hope is to "grep" for parts of your files that have been deleted and hope for the best.


A:  sounds like mirroring or backups is the only saving grace!
0
 
blklineCommented:
When you brought the system back up was not a fsck run on it?  What was the result?

More newer distros use some kind of journaling file system, such as ext3.   Give us a bit more information and perhaps we can help you out.
0
 
Risky101Author Commented:
Its an ext3 file system, running on Fedora 2. Another system we have is running on Redhat 9.1 - we've had the same symptoms on it too.

Running fsck.ext3 on it made no difference.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Risky101Author Commented:
Is there some way we could use an alternate superblock? Would that possibly fix the problem?
0
 
Risky101Author Commented:
As more clues, the directory contains about 1,000 .png files. The directory is called "data". We need to recover this directory, and the .png files contained in it.
0
 
owensleftfootCommented:
Have you tried any of the undelete tools? They were developed for ext2 but ext3 is just ext2 with journalling support. Have a look at
http://e2undel.sourceforge.net/
0
 
Risky101Author Commented:
Sorry, this wont work. From http://e2undel.sourceforge.net/how.html:

"The following applies only to ext2. Even ext3, despite its compatibility with ext2, behaves in one crucial point differently from ext2 (see below), so undeleting files on ext3 requires a completely different approach."

In addition, the e2undel page does not mention ext3 compatibility.
0
 
Risky101Author Commented:
Thanks for this. We have implemented a backup policy.
0
All Courses

From novice to tech pro — start learning today.