Solved Urgent recommendation needed!

Solved issue

ron.alan

Well-Known Member
Joined
Dec 24, 2023
Messages
588
Reaction score
528
Credits
4,122
I was going through my wife's external hard drive and renaming files (important pictures from 11 years ago) using Caja's renaming tool. In one folder I got a message saying there were errors during the rename, and all the pictures except one disappeared (only one survived and got renamed). I'm assuming the missing images are still there. Can you recommend a file recovery tool, and preferably one with a gui?
 


Leave the external drive alone as much as possible until you hear from someone here with the necessary experience.
The more you use the external drive the less chance you have of recovery.
 
Is the drive 11 years old or just the pictures? :P
This could be a number of things, but if it is the drive then the approach is:
1) disconnect from electricity immediately
2) make a plan what to do next

1) you can manage, for 2) - I can not tell if the drive itself is failing, and if the data on it is important then you should not connect the drive back to electricity to find out but instead create what is called a "dd image" of the disk, and then work with said dd image.
Failing drives often still have a view hours of runtime left in them, in which you can read the whole drive and create a copy - said dd image.
For this, tools such as ddrescue are a good idea: https://www.gnu.org/software/ddrescue/ which is a tool specifically written to make copies of drives failing. If the disk gives up half way, you can un-and-re-plug it and continue where you left off.
In order to store the dd image, you will need a second disk with enough space available. I recommend storing said dd image onto a filesystem somewhere, so you can later attempt to loop mount it or so.

If you did not write files to the disk, and if the disk is not breaking but the files were removed by some weird accident or bug in software you used, the data should still be there (unless you keep the drive plugged in, in which case background processes might write to the disk and overwrite the sectors that were previously used by the pictures you are missing now).

So long story short:
1) disconnect from electricity
2) learn about how to use https://www.gnu.org/software/ddrescue/ - ask if you have questions
4) get a drive at least slightly larger than the one you are trying to recover, create a filesystem in it and mount it so you can write the dd image onto it
4) write a small bash script ideally to use dd rescue, so you dont waste time fiddling around when you get to step 5
5) plug in old disk and run recovery script with ddrescue
6) when this is finished, unplug old drive and inspect the dd image - if all works well, you should be able to just loop mount the old partition(s).

Let me know about your skill level and we can go from there with more in depth knowledge.
 
I would try PhotoRec.
The other one I've heard someone else really positive about but it costs a one time purchase is SpinRite.
 
I would try PhotoRec.
The other one I've heard someone else really positive about but it costs a one time purchase is SpinRite.
Longtime Spinrite user here. Spinrite will not recover files wrongly deleted, it fixes the underlying media instead.

Spinrite should be only used once backup of the entire drive has been performed, and user confirms it's hard drive bad sectors which caused this, not a logical filesystem error.
 
Longtime Spinrite user here. Spinrite will not recover files wrongly deleted, it fixes the underlying media instead.
Thanks for clarifying, I've never used it myself but it came highly recommended by someone I know as it saved him a few times so I thought I was just share it here anyways. PhotoRec should be an option OP could use as that is specifically for recovering files.
 
Thanks for clarifying, I've never used it myself but it came highly recommended by someone I know as it saved him a few times so I thought I was just share it here anyways. PhotoRec should be an option OP could use as that is specifically for recovering files.

Indeed. Let me share a few more details about this program. I can also highly recommend SpinRite as a preventative maintenance tool, ideally before a drive starts developing reallocated sectors. Even after an ageing drive begins to accumulate bad sectors, running regular scans can often keep it usable for many years by marking all dodgy sectors as bad before they would normally be discovered, eliminating I/O errors and timeouts during normal use, and delaying the point at which the drive needs to be replaced.
However, SpinRite will not recover deleted files or repair logical file corruption. It does not analyse or repair the filesystem itself, it operates solely at the hardware level.
I bought the licence for this program over 10 years ago and still received a new major version update recently. It's a solid piece of software.
 
Thanks everyone for your suggestions. However, one detail that I forgot about came to mind after making this post, and which probably contributed to the caja bulk rename error. Back when we were using this drive as my wife's backup, she was on Windows. So this drive is formatted as ntfs (I know Linux sometimes has issues with the ntfs format).

Therefore I use a Windows recovery tool to find them (gratefully). It took two different programs and three attempts, but I finally found them with Recuva and its deep scan option (which took about 3 hours).

Again, thanks everyone for the suggestions.
 
Back when we were using this drive as my wife's backup, she was on Windows. So this drive is formatted as ntfs (I know Linux sometimes has issues with the ntfs format).

Therefore I use a Windows recovery tool to find them (gratefully). It took two different programs and three attempts, but I finally found them with Recuva and its deep scan option (which took about 3 hours).
Glad to hear you solved the problem. FYI PhotoRec also supports NTFS and several other filesystems.
I would try PhotoRec.
File systems
PhotoRec ignores the file system; this way it works even if the file system is severely damaged.
It can recover lost files from at least
  • FAT
  • NTFS
  • exFAT
  • ext2/ext3/ext4 filesystem
  • HFS+
 


Follow Linux.org

Staff online

Members online


Latest posts

Top