LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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: 55
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
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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: 55
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: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
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: 55
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: 55
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: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
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: 55
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
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
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
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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: 55
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



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 is empty! babyphil Slackware 31 11-01-2019 04:58 PM
/var/log/packages Crazed_Mofo VectorLinux 3 04-10-2006 06:54 PM
/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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:21 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration