Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Is there anyway to rebuild the contents of /var?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
Soyboy408
n00b
n00b


Joined: 24 Jan 2005
Posts: 6

PostPosted: Fri Mar 04, 2005 4:13 pm    Post subject: Is there anyway to rebuild the contents of /var? Reply with quote

I accidentally hit enter on
Code:
rm -rf /var/*

when I meant to do
Code:
rm -rf /var/tmp/*


the only missing files are /var/cache/ and maybe some of /var/db/ contents, which I know is bad :(
Please dont tell me that I have to reformat!
Back to top
View user's profile Send private message
Sith_Happens
Veteran
Veteran


Joined: 15 Dec 2004
Posts: 1807
Location: The University of Maryland at College Park

PostPosted: Fri Mar 04, 2005 4:35 pm    Post subject: Reply with quote

I think there is a way to use the tar utility to only untar selective directories within an archive, so if anyone knows how please post it. Not knowing how to do that however, I would say create a folder somewhere on your drive and untar whatever stage tarball you used in the install there (use the same flags described in the handbook). Then archive /var/cache and /var/db using these commands
Code:
tar -cjvf cache.tar.bz2 /(directory containing stage)/var/cache
tar -cjvf db.tar.bz2 /(directory containing stage)/var/db
Then untar them to /var using the same flags you used to untar the stage, only also use the -k flag so it doesn't overwrite old files.
_________________
"That question was less stupid; though you asked it in a profoundly stupid way."
I'm the brains behind Jackass! | Tutorials: Shorewall
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Fri Mar 04, 2005 7:03 pm    Post subject: Reply with quote

Please follow up to https://forums.gentoo.org/viewtopic-t-171015.html

Moved from Installing Gentoo.
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads 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