LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Data recovery - getting the files and folder structure from ext2 strangely affected (https://www.linuxquestions.org/questions/linux-software-2/data-recovery-getting-the-files-and-folder-structure-from-ext2-strangely-affected-4175440666/)

messeduplikeafool 12-09-2012 09:40 AM

Data recovery - getting the files and folder structure from ext2 strangely affected
 
Hi,

A sequence of events , which I'll try to mention with as much detail as needed, has lead to "deleting" all but a single one of my files on two 15GB ext2 partitions (each housing an OS).
(The one exception is a jar file, deep inside an /usr folder structure.)


I could not retrieve them with TestDisk undelete files option.


Partial success with PhotoRec.
Although I can see that the data is (mostly) still there, and can even start recovering some/most files with PhotoRec, I can't see how to recover the folder structure.
(I'd hate to rearrange the files back in order, it's like getting an incomplete number of puzzle pieces, without knowing what the full image looks like, only a vague description)





Chain of events:
(briefly)
day 01: installed Win XP => grub replaced (not my first time)

day 09: used Plop Boot manager off Hiren's cd to boot into a linux OS, all seemed ok

day 11: had time, so, as many times before, using the original install DVD for my sda2 partition (openSuSE 11.1), booted, chose repair, install new boot loader, but I believe made a simple but foolish mistake, pointing it to the older suse 9.2 root partition.
(I've left a question to the suse forum exactly what happens in such a case: https://forums.opensuse.org/english/...o-exactly.html )


I had 2 partitions, formatted as ext2 with openSuSE 11.1 ( released 2008), that seem to have been "checked" by the fsck.ext2 utility that came with SuSE 9.2 (released 2004)



Q1: Is it possible that using such an old version has reverted the ext2 filesystem to an older version, leading to the removal of almost all my files?


Q2: What might I do to recover the files AND folder structure?





I'll post more details as needed.

Thanks,
a foolish person

unSpawn 12-09-2012 10:58 AM

Quote:

Originally Posted by messeduplikeafool (Post 4845681)
A sequence of events (..) has lead to "deleting" all but a single one of my files on two 15GB ext2 partitions (..) The one exception is a jar file, deep inside an /usr folder structure.

*Note the other forum thread holds slightly more nfo than what's posted here.


Quote:

Originally Posted by messeduplikeafool (Post 4845681)
(..) Although I can see that the data is (mostly) still there, and can even start recovering some/most files with PhotoRec, I can't see how to recover the folder structure.

Even if we're talking "simple" deletion the answer is you can't recover the folder structure. Regardless of what actually happened (and half an hour is way too long for reinstalling GRUB and rearranging boot order) you can recover everything, or configure Photorec to limit itself to only certain types of files like images and documents, then after you're done use one of the parsing scripts the Photorec Wiki lists to sort by file type, discard for instance binaries and libraries and then inspect each remaining file.
BTW do you have any backups?

messeduplikeafool 12-10-2012 08:24 AM

Quote:

Originally Posted by unSpawn (Post 4845724)
*Note the other forum thread holds slightly more info than what's posted here.

I chose to break down my problem into 3-4 questions, and as my problem also deals with using SUSE, I thought it better to post those 2 questions there, and provide a link here.


Quote:

Originally Posted by unSpawn (Post 4845724)
Even if we're talking "simple" deletion the answer is you can't recover the folder structure.

This is not good news.


Quote:

Originally Posted by unSpawn (Post 4845724)
BTW do you have any backups?

The crucial data always is, in at least 4 separate places.
As for the rest, I can redo, re-buy, find the "puzzle pieces" or simply do without.

unSpawn 12-10-2012 08:52 AM

Quote:

Originally Posted by messeduplikeafool (Post 4846253)
This is not good news.

One of those facts. Have you figured out if you're going to recover everything or be selective about it? BTW do use a separate disk(!) to recover to.


Quote:

Originally Posted by messeduplikeafool (Post 4846253)
The crucial data always is, in at least 4 separate places.

Then it seems you did messedup but you didn't messeduplikeafool ...

ronykk 01-28-2013 06:01 AM

RE:
 
Hello,

Like Windows, Linux operating system also tends to get corrupted due to several factors like Group Descriptor Block corruption, damaged Super or Inode table, deleted partition structures, improper system shutdown and various others. Kernel for Linux is a perfect tool that helps the users to recover the lost and damaged data in an efficient manner.


All times are GMT -5. The time now is 08:22 PM.