LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-24-2013, 05:05 PM   #1
jozmak
Member
 
Registered: Aug 2005
Posts: 81

Rep: Reputation: 1
Need help recovering lost files[SOLVED]


Hello,

I need help desperately to recover lost files. This is what happened in a nutshell. I have an external hard drive that I used solely as a storage hard drive. The other day I tested a Linux a live distro by using USB creation program. I put a USB stick in the machine but due to my carelessness I didn't check everything and the program written the live CD on my external hard drive rather than on my USB stick. Now, I lost hundreds of my photographs some of which are irreplaceable. I'm experimenting with some program for days trying to recover the lost files without success.

I tried “testdisk” following several step by step tutorials but my output doesn't match to what the tutorial says.

I tried using “debugfs” program without success. I get messages like: “/dev/sdc: Bad magic number in super-block while opening file system”

I've tried ext4magic, but I get messages like:

[root@myhost mak]# ext4magic /dev/sdc -M -d /home/recover
/dev/sdc Error 2133571347 while opening filesystem
"/home/recover" accept for recoverdir
ext4magic : EXIT_SUCCESS
[root@myhost mak]#

The file system on the hard drive was not formatted before the live cd was written on it. I don't know this makes any difference. Before the disaster the harddrive had ext3 filesystem.

I have absolutely no experience with recovering files. Could anyone who understands about recovering files help me lead through the process or suggest some other programs to use to recover them. I lost about 100-150 gig saved files mostly photographs. I don't mind if I can't recover the other files but I desperately need to recover my pictures because I cannot replace them.

Thanks a lot everyone for the help.

jmak

Last edited by jozmak; 05-25-2013 at 09:08 PM.
 
Old 05-24-2013, 05:40 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by jozmak View Post
(..) due to my carelessness I didn't check everything and the program written the live CD on my external hard drive rather than on my USB stick.
If such an USB creation application overwrites the file system in a dd-like fashion (copying CD contents bit by bit) then you've not only lost the file system structure (allowing recovery with file names intact) but also anything the size of that CD (usually written from the start of the disk). Photorec, testdisk's companion app, may be able to retrieve files but there's no guarantee recovered files will be complete or usable.
 
Old 05-24-2013, 05:50 PM   #3
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Try photorec. It might find some files for you.
 
Old 05-24-2013, 06:30 PM   #4
jozmak
Member
 
Registered: Aug 2005
Posts: 81

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by PTrenholme View Post
Try photorec. It might find some files for you.
Thanks a lot for suggesting photorec

It already started recovering files. Over one thousand jpeg and several hundred raw image files have already recovered. It takes 10 hours to finish scanning the 500 gig harddrive. I report back when it will be done.

Thanks a lot.
 
Old 05-24-2013, 06:52 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
While the recovery takes place you should take the time and think about implementing at least a basic backup strategy to prevent data-loss in the future. Imagine the drive just died instead of the accident that happened, all your photos would either be unrecoverable or you would have to spend a large amount of money to let a professional data recovery institute do the work.
The amount of money spend on a second drive for backup purposes is at least a magnitude smaller than hiring a professional for recovering your valuable photos.
 
Old 05-24-2013, 10:43 PM   #6
jozmak
Member
 
Registered: Aug 2005
Posts: 81

Original Poster
Rep: Reputation: 1
Hello,

I ran into a major problem. The files that I'm attempting to recover are approximately 100 gig in size. However, my distro is installed on a 27 gig partition. I overlooked this problem and now, my entire partition is full and the program stopped recovering the files giving me the message to free up more room for the files.

Photorec saves files in the home directory by default. I'm searching all afternoon how to direct the program to save files on a different partition with plenty of room. I was not able to figure it out, I looked at the program's home page, but found no indication how to do it.

I already posted a message on photorec forum but the post first has to be approved by a moderator. I posted a it 6 hours ago and it still hasn't appeared.

So I am posting it here too maybe someone knows how to direct photorec to save files on a different partition.

TobiSGD,
I'm already thinking about a new strategy of backing up files on several devices. The problem is that the new external hard drives don't have turn off button like before. They run all the time. This slows down reboot, the installation of new distros and the risk to mix it up with something else especially when you have several partitions like in my case with 13 partitions on two internal hard drives.


Thanks a lot,
jmak

Last edited by jozmak; 05-24-2013 at 10:44 PM.
 
Old 05-25-2013, 04:54 AM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by jozmak View Post
Photorec saves files in the home directory by default. I'm searching all afternoon how to direct the program to save files on a different partition with plenty of room. I was not able to figure it out, I looked at the program's home page, but found no indication how to do it.
You change the directory where the files are saved directly after you have specified the filesystem that Photorec should suspect on the partition/disk you want to recover.

Quote:
The problem is that the new external hard drives don't have turn off button like before. They run all the time. This slows down reboot, the installation of new distros and the risk to mix it up with something else especially when you have several partitions like in my case with 13 partitions on two internal hard drives.
If you have your backup devices always attached and running you are doing it wrong. Just attach the device once a day (or whichever timeframe is appropriate for you), make the backup, detach it again and put it away. Alternatively, since you seem to have large amounts of data think about solutions like a NAS.
 
Old 05-25-2013, 07:32 AM   #8
jozmak
Member
 
Registered: Aug 2005
Posts: 81

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by TobiSGD View Post
You change the directory where the files are saved directly after you have specified the filesystem that Photorec should suspect on the partition/disk you want to recover.

If you have your backup devices always attached and running you are doing it wrong. Just attach the device once a day (or whichever timeframe is appropriate for you), make the backup, detach it again and put it away. Alternatively, since you seem to have large amounts of data think about solutions like a NAS.
Thanks TobiSGD,

It was a bit tricky to find the other harddrive but it is done. Now it is recovering the files.
 
Old 05-25-2013, 09:06 PM   #9
jozmak
Member
 
Registered: Aug 2005
Posts: 81

Original Poster
Rep: Reputation: 1
Thanks everyone for all the suggestions and help.
I succesfully recovered all of my lost files.
Now, I have to sort them.
13 thousand jpegs and about 4 thousand raw files, it will take some time.
Photorec is a truly outstanding recovery program.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Recovering lost files on LVM2 + RAID5 following disk failure & re-assembly? cloudon7281 Linux - Server 0 09-21-2010 11:21 AM
Recovering files lost by mount command thirumalesh Linux - General 2 06-09-2008 03:22 AM
Recovering lost files? Wocky Linux - Hardware 2 01-02-2007 01:45 PM
Recovering Lost Data lawrencegoodman Linux - General 1 04-04-2004 12:57 PM
Recovering Lost Files gonus Linux - Software 1 08-08-2003 02:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration