I am seeking data recovery/rescue advice—and it's not a typical situation
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am seeking data recovery/rescue advice—and it's not a typical situation
I backed up my "Home" folder on an external hard drive and re-installed Linux (long story, but it was necessary). Instead of copy and pasting from the external hard drive, I cut and pasted the Home folder. Now, I had fully intended to copy and paste. It was an accident. Then later, I decided to reinstall Linux a second time (again, long story, but it was necessary) and I went back to my trusty external hard drive and discovered no Home folder. It was only then that I realized I cut and pasted instead of copy and pasted.
My question this (and you probably can see it coming): can I rescue the home folder from the external hard drive? If so, how?
Is it still 'there' on the hard drive, but not viewable with the OS? Sort of like if you went to a library and threw away the cards from the card catalog of a certain book. The book would still be there; it would just be more difficult to find. It seems to me that if it was 'there' at some point, it will be 'there' until that sector of the drive is written over by something else. Is that how it works? If so, can I somehow find these files?
Well, your situation IS typical. And, yes, the files are still there. What file system are you using?
Ok, I'm glad to learn that my situation is typical. I thought the typical situation is "oops, I accidentally pressed 'delete'" or a case that the hard drive itself had a problem.
I think I'd be trying a program called testdisk before you make too many changes to the external drive. Photorec is similar but many live cd's have testdisk or you can easily add it in.
"Data recovery
If you have lost partition or strange problem with your hard disk partitions, run TestDisk to recover your data. TestDisk detects numerous filesystem including NTFS, FAT12, FAT16, FAT32, exFAT, ext2, ext3, ext4, btrfs, BeFS, CramFS, HFS, JFS, Linux Raid, Linux Swap, LVM, LVM2, NSS, ReiserFS, UFS, XFS.
TestDisk can also undelete files from FAT, NTFS, exFAT and ext2 filesystem.
To recover your lost digital pictures or lost files, try PhotoRec. PhotoRec is a signature based file recovery utility. It handles more than 440 file formats including JPG, MSOffice, OpenOffice documents. "
The good news: I recovered everything I wanted to recover with Photorec.
The bad news: Photorec recovered about 50,000 different files that I didn't want to recover.
That wouldn't be so bad, except that, as you know, Photorec grabs the files off the disc and gives them seemingly arbitrary names (the meta-data having been deleted). So now I have the fun task of going through tens of thousands of files, deleting the ones I don't want, and renaming and refiling the ones I do want.
Standard practice in such a case - a quick search should find scripts that will recover, er reclaim, most of your vacation time. Generally just something grep or exiftool if you know what you are searching for - should even be some on the gcsecurity site.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.