[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: is there a good way to restore file list in rpm



thanks to the rpm-list@redhat.com i have 99% of my rpm db back, here is how i did
it (skip if you are not interested):

rpm -qa > rpmlist # now i have a list of all my installed rpms, at least this still worked

mkdir /tmp/rpms
rpm --dbpath /tmp/rpms --initdb # now i have nice clean empty one

and then for every package in rpmlist i do:

rpm -ivh --force --nodeps --dbpath /tmp/rpm --justdb /where/ever/rpms/live/package*.rpm

then i just copied the /tmp/rpms/* over /var/lib/rpm/

all done!

(all i am waiting for is what happens next, i did install a new package which i did not have
before and that went ok, so keeping fingers crossed here).

PS: i said 99% because 3 rpms where missing from my disk, so i "installed" an older
version for each of these,

On Thu, Nov 16, 2000 at 02:58:39PM -0500, Jeff Johnson wrote:
> On Thu, Nov 16, 2000 at 11:23:37AM -0800, Perry Hutchison wrote:
> > > don't ask how but i wounded up with an rpm db that will list all
> > > my packages correctly but anytime i do a rpm -ql package-name it
> > > will say (contains no files)
> > >
> > > Is there a way to rebuild the rpm database (without reinstalling
> > > everything) so that the end result is a correct rpm-db?
> > 
> > Since you can still get a list of your installed packages, and
> > assuming you have all the corresponding rpm's, it may be possible
> > to recover.  The following is untested ...
> > 
> 
> Basically correct, but ...
> 
> > 1.  Extract and save the list of installed packages.
> > 2.  Back up the existing rpm database so matters don't get any worse.
> > 3.  Make a new database using --dbpath.
> 
> ... presumably you meant --initdb not --dbpath here ...
> 
> > 4.  Using the list saved in step 1, load all the installed packages
> >     into the new database using -i, --dbpath, and --justdb.  This
> >     shouldn't actually install anything, but should update the (new)
> >     database as if it had.
> 
> ... and you will want to use
> 	--nodeps --noscripts --notriggers
> with --justdb.
> 
> 73 de Jeff
> 
> -- 
> Jeff Johnson	ARS N3NPQ
> jbj@jbj.org	(jbj@redhat.com)
> Chapel Hill, NC
> 
> 
> 
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/rpm-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []