[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [REDHAT] Re: DO NOT sysadmin your box after midnight!
- From: David Kramer <david thekramers net>
- To: <redhat-list redhat com>
- Subject: Re: [REDHAT] Re: DO NOT sysadmin your box after midnight!
- Date: Fri, 31 Aug 2001 01:10:37 -0400 (EDT)
On Fri, 31 Aug 2001, Hal Burgiss wrote:
> On Fri, Aug 31, 2001 at 12:25:29AM -0400, David Kramer wrote:
> >
> > I was cleaning up another partition that used to be a root partition, but
> > is now mounted under /oldroot.
> >
> > I deleted /var/lib/rpm instead of /oldroot/var/lib/rpm.
> >
> > I'm hosed, right? I tried rpm --initdb abd --rebuilddb, but that just
>
> Hosed, AFAIK. Been there once, when I lost a partition. I guess
> re-install is one option. What I did, was get the CD's out, install
> all the biggies: glibc*, X*, gcc*, and anything you recognize :)
>
> Then I wrote a script (details now forgotten), to check all files
> in the key directories (/bin, /usr, /lib, etc), against the rpm contents
> on the CD (rpm -qpl) -- one at a time, and generated a list of rpms to
> be installed from that. A couple of caveats...if you've done the
> updates, then you should substitute those for the ones on the CD(s).
> Also, if you've installed any non-stock packages, hopefully you have a
> list, or can remember them. Since my adventure, these all go in
> /usr/src/redhat/RPMS now. I wound up with a very short list of stuff,
> I had no idea what it was. But 99% got taken care of.
I do fairly regular backups of selected files, but /var/lib/rpm didn't
make it to the list (it will now!!!). Part of my back up does an rpm -qa
and rmp -qia to two separate files. So I have a complete list of rpms
that were installed as of last month.
I noticed an rpm option "--justdb" that says it will just update the
database and not the filesystem. So let's say I wrote a little script
that reads in my rpm -qa list and does a
rpm --nodeps --justdb \
ftp://ftp.redhat.com/pub/redhat/linux/7.0/en/os/i386/RedHat/RPMS/$RPMNAME
for each line. Should that work for any packages that I haven't updated
since the install? Then I could look for the rest in the updates
directory, etc. Whatya think?
-------------------------------------------------------------------
DDDD David Kramer http://thekramers.net
DK KD
DKK D "No matter how much cats fight,
DK KD there always seem to be plenty of kittens."
DDDD - Abraham Lincoln (1809-1865)
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]