Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
There are some tools which are intended to be run to recover lost data. The guides to using them typically benefit best with the following recommendations applied:
Minimize any access to that disk as soon as you encounter a data loss
Un-Mount the disk or shutdown as soon as possible
Boot from somewhere else, such as a live USB distribution and not off of the disk where you lost data, do not re-mount it
Run the recovery utility off of the alternately booted distribution; against that not-mounted disk.
Note that whatever you use, likely will not recover all the data
Time and amount of system usage makes a big difference; which is to say that if you kept your system running and did things with it; such as attempted to run the cron job which would access or create data in that directory, then good chance a large chunk of your deleted data may have been corrupted. Or if you downloaded and saved information to disk, it is also possible that your deleted data may have been corrupted.
Here are three links and my experience with this. Actually very recent, I had an rm -rf situation recently occur as well.
extundelete - For use with ext3 and ext4 partitions. Personally I've never had an ext3 partition, but I do have ext4. This worked best for me, it was my first attempt, the results stunk actually, but my belief is that the results actually were never going to be ever better than mediocre.
Undelete files on Linux systems - After my first attempt and finding that I didn't get much data, I tried this option. I probably should hesitate to even recommend it because it did not work; really it "told" me where there were problems but there was little I could do beyond what had already been done. I feel the overview is helpful and it does highlight some good understanding of what partitions really are on your disk.
Recover Deleted Files in Linux - This was my final attempt and I feel that it actually would work pretty good; however (and it's a BIG however) I feel that it is highly specific to certain file types. Such as it will find .DOC, .DOCX, .XLS, .XLSX, or JPEG, GIF, MPEG, and so forth; pretty much a TON of the common files one has for documents, pictures, ... professional or personal "data". My big however was that I'm a coder, therefore I have Makefiles, C, CPP, H, and so forth. It found ZERO of those files. Also things like .LOG, or .TXT, pretty much any type of file that is non-standard in the view of the creators of that tool. It has customization to concentrate on particular file types, I tried to give it C, H, and so forth; no joy. The customization is limited to the file types which that application already knows about. So it was a great tool, but I really didn't need all the images from my former browsing cache.
Photorec is in my third link. I should point out that Foremost was the one I was referring too which limited the file types. Photorec does work and does not limit the file types; I agree with schneidz and would recommend you try that first.
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
Rep:
another tip is to create an image of the volume with DD and run photorec on the image, rather than the original drive, and first and foremost, NEVER, EVER, E-V-E-R, try to recover data to the same volume from which you are recovering.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.