LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Recover files from vhost on Ubuntu 11 (https://www.linuxquestions.org/questions/linux-server-73/recover-files-from-vhost-on-ubuntu-11-a-4175511686/)

zaithianknightwolf 07-20-2014 02:41 PM

Recover files from vhost on Ubuntu 11
 
Hey everyone,

Im a semi experienced web developer and at my work we've recently had an issue with a series of files from /var/www/vhosts/ being deleted that we need to recover. We thought there was as a back up but sadly this wasnt the case.

I've installed testdisk to try to pull files but there seems to be a major issue in that the file system is bad, hence nothing is being pulled up as deleted. I find it very odd that this happened but I am at a loss as to what to do.

I was thinking about booting up Ubuntu from a USB stick and unmounting the drive (sba) and doing a file check on it. But my fear about doing that is that I would permanently loose the information. Am I alright in doing this or would there be another method to recover files?

Thanks for any any all advice!

TB0ne 07-21-2014 08:49 AM

Quote:

Originally Posted by zaithianknightwolf (Post 5206914)
Hey everyone,
Im a semi experienced web developer and at my work we've recently had an issue with a series of files from /var/www/vhosts/ being deleted that we need to recover. We thought there was as a back up but sadly this wasnt the case.

I've installed testdisk to try to pull files but there seems to be a major issue in that the file system is bad, hence nothing is being pulled up as deleted. I find it very odd that this happened but I am at a loss as to what to do.

I was thinking about booting up Ubuntu from a USB stick and unmounting the drive (sba) and doing a file check on it. But my fear about doing that is that I would permanently loose the information. Am I alright in doing this or would there be another method to recover files?

The first thing that would help, is if you told us what the "major issues" you see are, and why you think the file system is bad. Bear in mind also, that testdisk may NOT find anything, if the disk was used for a while, since those sectors may not be recoverable any longer...might not be a bad file system, but the files may just be plain gone. Utilities like testdisk or photorec aren't ever going to be a substitute for a backup. That said, it may be time to think laterally; could those vhosts files still be lurking (maybe even an older version?) on developers workstations? Editor backup files? Something you can work with, to stop you from having to go back to square one?

You COULD boot up via USB, and fsck the drives, but that's not really going to get you anything in this scenario. More importantly, before you power off/reboot/do ANYTHING else, you need to MAKE A WORKING BACKUP of what you've still got. And if you're a web developer, who is your systems administrator, and why aren't they taking care of all this?

linosaurusroot 07-21-2014 08:55 AM

By backup of the current state the above advice means at least a "dd" type backup (or a snapshot) of the volume with the filesystem on it. Once you have that safely on a machine with no disk problems (and keep that backup unchanged) you have as long as you want to apply recovery tools to it - or refer it to someone else with skill in that area.


All times are GMT -5. The time now is 07:05 PM.