LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   mental blip causes deletion of /var (https://www.linuxquestions.org/questions/linux-general-1/mental-blip-causes-deletion-of-var-209945/)

esteeven 07-26-2004 05:05 PM

mental blip causes deletion of /var
 
Oh dear. I can't believe that I just did that. I deleted /var --- yes everything inside it. My stupidity missed nothing ....now I can clearly see the importance of the contents of /var. Is there any way, short of a reinstall, of getting the contents of /var back?? This is on a minimal Debian Woody install.
{I have grounded myself, stopped my pocket money and have sent myself to my room. I know I have been bad.}

frob23 07-26-2004 06:25 PM

Do you have another installation of Linux that you can access?

If you do... then you can recreate the directory with the permissions etc on your machine. That should clear up most things -- but not all. You could try and copy it from one system to the other but that would also create a huge mess.

You are going to have to massage this system in just the right ways to get this back to where you want it. But it can be done. Attention to detail is the key (and access to a populated /var directory).

Lucasss 01-03-2023 06:32 AM

For myself, I use the technique of not going crazy right away, but postponing the problem for a while, in this way I manage to find a more suitable solution.

esteeven 01-03-2023 06:44 AM

Quote:

Originally Posted by Lucasss (Post 6401936)
For myself, I use the technique of not going crazy right away, but postponing the problem for a while, in this way I manage to find a more suitable solution.


Exactly. So much time has passed.

chrism01 01-03-2023 11:01 PM

Here is a list of possible tools to help : https://www.digitalocean.com/communi...recovery-tools.
Photorec and Testdisk tend to get recommended here at LQ, but have a read.

The most important thing though, is how soon after it happened (not when you discovered it) did you stop using the machine entirely(!)?
Linux will have started using those 'now available' disk blocks ...

You need to make a copy of the relevant disk partition and work on the copy, not the original - that way you can have several goes, possibly with different tools, and merge the results.

esteeven 01-04-2023 05:58 AM

Seeing as how my original post was made in 2004, I think it's high time that I marked this thread as solved. If I remember correctly, the simplest solution was to do a fresh install. I also made a promise to myself to never ever delete without thinking.

Quote:

originally posted by chrism01

Here is a list of possible tools to help : https://www.digitalocean.com/communi...recovery-tools.
Photorec and Testdisk tend to get recommended here at LQ, but have a read.
I have used both Photorec and Testdisk to rescue data from failed drives with great success in the years since my post and they are superb tools.


All times are GMT -5. The time now is 01:32 PM.