LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 04-04-2007, 04:02 PM   #1
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 54
Unhappy Can I recover /var/log/packages after a disaster?


Hi guys,

Due to a faulty shell script I toasted my system. Lucky me, I had backed everything up 7 minutes before my runaway script. The only thing I lost was the package directory.

How can I get it updated? I can't use pkgtool to delete stuff because it doesn't think it's there. I have all the packages, too, but everything is already installed.

Thanks,
Rand

Last edited by Randux; 04-04-2007 at 04:03 PM.
 
Old 04-04-2007, 04:07 PM   #2
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
What exactly did you wipe/toast ?

You can try a live CD (or even the slackware install CD/DVD), mount your HDD, cd into there and do something with the data.
 
Old 04-04-2007, 04:12 PM   #3
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Original Poster
Rep: Reputation: 54
Every hour I rsync my whole system onto another drive. I set up the backup script so I can boot right into the copy of the system. I lost the main system so I just restored it from the backups. The only thing I need to do now is to restore /var/log/packages. The only thing I didn't backup was /var/log.

Last edited by Randux; 04-04-2007 at 04:16 PM.
 
Old 04-04-2007, 04:13 PM   #4
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,913

Rep: Reputation: Disabled
Well, if your system was fairly vanilla (no custom packages) and was a full install, you could copy over the /var/log/packages from another installation. If you had custom packages installed, you could still do that, but the information from those packages will be missing, so you could then do an "upgradepkg --reinstall --install-new" on the affected packages.
As a last resort, you could just do the upgradepkg --reinstall --install-new on the entire Slackware tree, and it *should* be fine, but no promises...
 
Old 04-04-2007, 04:27 PM   #5
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Original Poster
Rep: Reputation: 54
Thanks, I'll look at upgradepkg. I have a minimal install and about 75% custom packages after that.

Last edited by Randux; 04-04-2007 at 06:20 PM.
 
Old 04-04-2007, 06:16 PM   #6
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Original Poster
Rep: Reputation: 54
Thanks Robby. I think the package directory is mostly ok now.

Rand
 
Old 04-04-2007, 10:39 PM   #7
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,913

Rep: Reputation: Disabled
Good deal - glad it worked out for you.
You're going to have a few *.new files lying around now. Do a:
find / -name "*.new"
to find them (most will be in /etc), compare them to the originals, and most likely discard them. A few can be discarded immediately - /etc/passwd, shadow, group, gshadow, perhaps others - you get the idea...
 
Old 04-05-2007, 09:21 AM   #8
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Original Poster
Rep: Reputation: 54
Hi Robby,

The only packages I had to reinstall were my own and 2 stock Slackware packages that were actually there but pkgtool was showing the wrong level. It took me a few hours to clean up the mess but it seems ok, I haven't found any problems. Nothing was missing except /var/log/packages but I didn't realize what a royal PITA it is to recover it. Now I'm backing that up too

Thanks a lot for the help

Rand
 
Old 04-05-2007, 02:40 PM   #9
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Yeah, it might seem trivial, but you definitely want to make sure it is backed up. Actually backing up all of /var is not a bad idea. That way you would have the system logs from before the failure/disaster occurred, which might be helpful.
 
Old 04-05-2007, 02:42 PM   #10
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
I agree. There's no real reason not to back it up ... unless, of course, it is huge. But, that's usually not the case. For example /var is about 22 MB right now on my machine.
 
Old 04-06-2007, 05:40 AM   #11
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Original Poster
Rep: Reputation: 54
Hi guys,

I set up a mirror of my main system on another drive so I can boot into it if the primary drive fails. I didn't back up the package directory but I did back up most of /var. I'll have to think what the best way to go is now that I had my first test . Nothing like a real disaster to test your disaster recovery plans.

Thanks for everyones help and comments.

Rand
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/var/log/packages Crazed_Mofo VectorLinux 3 04-10-2006 06:54 PM
/var/log/packages is empty! babyphil Slackware 6 03-01-2006 04:57 AM
/var/log/packages vanished Idle Slackware 3 09-19-2005 12:57 PM
/var/log/packages gone! PurpleMotion Slackware 1 10-02-2004 03:04 PM
accidently deleted /var/log/packages lennard Slackware 8 06-21-2004 02:15 AM


All times are GMT -5. The time now is 03:44 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration