recover home directory after userdel
Write me it's possible... pls :(
I've deleted the bad user and important data where in is home folder. Is there a way to recover it ? Thanks |
Not sure if you can recreate the home folder or not.
But you might be able to recover the data by plugging the drive into another machine and using photorec and/or foremost. They're data recovery tools for when you accidentally mess up your drive or reformat it. But it should work here as well. The only downside is that you have to manually sift through all the data and your filenames will be lost. |
Here's the question: does /home/username still exist ... or not?
If userdel nuked that directory, then I am very sorry to say that ... yer scro-o-o'd... :rolleyes: But if, by some happy happenstance, the directory does exist, then you can mv the files anywhere you want them to go, and chown them into the ownership of whomever you please. |
After some search, I've try "photorec". Lots of data where recovered but nothing that was in that folder.
I've also try a grep: "grep --binary-files=text -a50 -b300 "<?php" >/mnt/SomeNetwork" This has recover most php file of this user in a huge 250mb text file ! Unfortunably, picture and all other file where lost but it's no big deal. Thank you |
I've used foremost before and it's very good. Maybe try that, assuming while using photorec you didn't dump the recovered data to the same drive you were recovering from in which case you probably overwrote any other recoverable data.
|
Quote:
|
I've Switched the filter to only show up jpeg, gif, png and PSD.
8 hours remaining !!! 8000 file copied for now. I've found some that was in the user home folder. I'll let it go... |
You are writing to a separate drive or partition, correct? Otherwise, the program will find the files it just copied over and over and over again. Not to mention it might overwrite some of the data you're trying to recover...
|
i'm writing ont a network drive
|
Hi,
Just want to thank you all. I have successfully recover majority of lost file. We now have a little job of find and rename files !! Discovered something about photorec. I have first search with default option (all filter on) and restored 35 000 files. Didn't get what we had lost. I have then made another search with only gif, jpg, png and PSD filter on. recover 23 000 images. the want we need where in there. After that, made an txt file search (txt, html, php) and recover 55 000 files for a total of 78 000 files compared to 35 000 the first time ! If you have to recover something with photorec, search seperatly for each type of file you need ! Good day SaRgE |
All times are GMT -5. The time now is 05:12 PM. |