Find the answer to your Linux question:
Results 1 to 7 of 7
Hi All, A few nights ago I did the dumbest thing an experienced linux user can do....I formatted not only my up to date files, but also my week old ...
  1. #1
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    1,958

    Recovery Options -- Formatted Drive

    Hi All,

    A few nights ago I did the dumbest thing an experienced linux user can do....I formatted not only my up to date files, but also my week old backups (yes, that's right, everything was backed up but it is also gone now).

    To say the least, I've been frantically trying to recover the backup drive and I've made some significant progress (not writing to the drive at all so most of my stuff "should" be there)

    I'm following these instructions:

    https://help.ubuntu.com/community/DataRecovery


    Progress:

    I've been able to image my hard drive (but had to image it over two drives because of the size) using ddrescue:

    Code:
    ddrescue --no-split /dev/hda1 imagefile logfile

    I then was able to mount the two images that I have on the separate drives by doing the following:

    Code:
    sudo losetup /dev/loop1 /media/Drive1/image
    sudo losetup /dev/loop2 /media/Drive2/image
    sudo mdadm -B /dev/md0 -l linear -n 2 /dev/loop1 /dev/loop2

    I am now at work and I'm trying to recover all of my pictures (7 years of pictures, honeymoon, wedding, dorm life....my whole life ). To do this I'm doing the following:

    Code:
    sudo foremost -t jpg -i /dev/hda -o /recovery/foremost
    Now assuming this works (which I am fairly confident that it will, my next problem is that the file types supported by foremost are incredibly limited. Example:

    All of my documents (or virtually all) are odt files, foremost only supports .doc (what the $#($* is that??). So, I'm looking for options, important file types include

    odt (and corresponding other open office/libreoffice file types)
    mp3 (5,000+ legally bought songs, many of which were bought from amazon)

    and lastly....

    I have a kmymoney file that I REALLY want (seriously 6 years of finances that has charts, trends, everything....my wife actually panicked more about this than she did about our honeymoon pictures (not to say that she didn't panic about those also).


    Any advice would be incredibly appreciated, hope everyone is starting the new year off right.


    Edit: I see that open office docs are just zip files so they'll be recovered. Now I'm down to mp3's and that kmymoney file, that should be the vast majority of my drive
    Last edited by jmadero; 01-04-2012 at 03:21 PM.
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

  2. #2
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,095
    The more changes you make to a drive, the less your chance for a recovery, but I generally recommend TestDisk and PhotoRec for file and partition recovery:

    http://www.cgsecurity.org/wiki/TestDisk

    http://www.cgsecurity.org/wiki/PhotoRec

    I'd recommend running them from a liveCD such as the Parted Magic LiveCD, and documentation for using each app can be found on their respective web pages.

    If Foremost didn't work, and these won't work for recovering all that you need, I think you are probably out of luck.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  3. #3
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    1,958
    I'm not writing to the drive at all, I'm imaging it to a completely different drive and then using the image to try to recover so the files should be in tact on the 500 gig "backup" drive. I'm reading up on magic recovery, supposedly I can make my own rules to find files. Thinking about trying that out. I'm trying to find a recipe (what they call their rules), for mp3's, you'd think that's a pretty common file type to need to recover.

    Does TestDisk recover mp3's?
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

  4. #4
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,095
    Quote Originally Posted by jmadero View Post
    Does TestDisk recover mp3's?
    You would probably want to use PhotoRec for that, and it can sometimes recover the different file types found here:

    File Formats Recovered By PhotoRec - CGSecurity
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  5. #5
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    1,958
    Last question (maybe), how do I see the hex for a partition? Basically a hex editor. I've read that with Magic Recovery you can make the recipe based on the hex codes so my plan was to format a partition completely that I have, make a kmymoney file, format it again, and then look at the hex to make my own
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

  6. #6
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    1,958
    Having some real success now Pictures are salvaged, working on zips now which will contain my open office documents now. I have a question about that, my files will all be zipped files is there a way for me to do a terminal search in the directory to try to locate the files I'm looking for?

    I know that the meta.xml file inside of the zip will contain the title so if I could search the zipped meta.xml's in the entire directory (hundreds of zipped files), that would make my job much easier. Appreciate the help
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

  7. #7
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    1,958
    Wanted to thank you Ozar for your help. Was able to recover the vast majority of my stuff including my photos and music, I'm happy and setting my system up again
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...