Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Implications of semi-deleted /var
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
iKiddo
Guru
Guru


Joined: 27 Jun 2002
Posts: 341
Location: Europe?

PostPosted: Wed Dec 20, 2006 10:44 pm    Post subject: Implications of semi-deleted /var Reply with quote

Yesterday, besides all my troubles being far away, I had a place for all my /var stuff to stay... oh I... ah forget it.

Thinking I wasn't an idiot, I deleted all kinds of folders from my /var directory. The idea was to remove useless stuff from a 1-day old backup I just migrated away from. For now I reinstated my backup var.

Everything seems to still work fine.

This is what I deleted:
Code:
account/ empty/ lock/ lib/ mail/ run/ spool/ state/ tmp/ www/


What hickups can I expect? Will there be any?


The rush of a brand new 7200rpm drive in my 3yr old laptop, clubbed to earth by issuing an onerous rm -Rf command...
Back to top
View user's profile Send private message
erik258
Advocate
Advocate


Joined: 12 Apr 2005
Posts: 2650
Location: Twin Cities, Minnesota, USA

PostPosted: Wed Dec 20, 2006 11:09 pm    Post subject: Reply with quote

It depends on what you're doing with the laptop, iKiddo. A lot of run time stuff gets stored in /var, and so while it's possible you will not have any problems at all, it is also possilbe (likey) that you'll have to create some directories, manage some permissions, and whatnot. If it was webserving, you just lost your content. hopefully it was backed up? If you had a unified mail store, it was nuked. But if your computer wasn't doing anything, it might be OK.

You may want to consider, if you have lots of problems, figuring out how to extract the /var directory from a stage3 tarball and copy your existing var on top of it, then replace your existing var with it.

I will say that on one of my servers i migrated over to raid, i removed /var from the disk without preserving permissions, and that messed things up big time. I did eventually manage to fix almost all of it, but still can't su for some reason. At any rate, be prepared to fix things.
_________________
Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit!
Back to top
View user's profile Send private message
Dlareh
Advocate
Advocate


Joined: 06 Aug 2005
Posts: 2102

PostPosted: Wed Dec 20, 2006 11:09 pm    Post subject: Reply with quote

You should probably re-install anything you've (un)installed since the backup was made, so your world file is in order.

Other then that you are most probably fine, since you probably aren't running something like a web server, database, or MTA that stores its data in /var. But if you are then anything that had changed since the backup was created has been lost. That's just common sense.
_________________
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?
Back to top
View user's profile Send private message
iKiddo
Guru
Guru


Joined: 27 Jun 2002
Posts: 341
Location: Europe?

PostPosted: Thu Dec 21, 2006 8:13 am    Post subject: Reply with quote

Well, it turns out almost everything went flawless. Thankfully, the backup was only 1 day old. So after I restored the backup, rebooted the pc and had a good night's sleep everything works like a charm.
I had to reinstall thunderbird, because I was emerging it (in favour of seamonkey) while I deleted the stuff in /var.

My world file is still intact, because I didn't delete all of /var. I didn't have any other important data in /var. I have a tiny website for private use on /www and don't run databases or mailservers.

It seems /var/lock/, run/, state/ and account/ seem more threatening that they were. For me, at least.

Thanks for the info.
Back to top
View user's profile Send private message
broken_chaos
Guru
Guru


Joined: 18 Jan 2006
Posts: 370
Location: Ontario, Canada

PostPosted: Sat Dec 23, 2006 11:52 pm    Post subject: Reply with quote

iKiddo wrote:
It seems /var/lock/, run/, state/ and account/ seem more threatening that they were. For me, at least.

Those four are, if I remember correctly, mainly used when the system is on, and are pretty much repopulated every single time you boot, from daemons starting, etc. At least lock, run, and state are used mainly that way.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum