Accidentally deleted contents of /var/lib/ (Dale Sykora)

Mike McGrath mmcgrath at iesabroad.org
Wed Mar 16 22:31:19 UTC 2005


The yum logs and the packages file are very different.  The rpm packages
file is actually a Berkeley database file.  The yum log is more when
stuff got added and deleted and the rpm database is what you currently
have.

	-Mike


-----Original Message-----
From: fedora-list-bounces at redhat.com
[mailto:fedora-list-bounces at redhat.com] On Behalf Of Saurabh Barve
Sent: Wednesday, March 16, 2005 4:23 PM
To: fedora-list at redhat.com
Subject: Re: Accidentally deleted contents of /var/lib/ (Dale Sykora)

Saurabh Barve wrote:

 >> Hi,
 >>
 >> I am running FC2. I accidentally deleted the entire contents of my
 >> /var/lib/ directory. As a result, rpm -qa shows up nothing. Also,
the


 >>>>Saurabh,
 >>>>	You might be able to get a pkg list from /var/log/yum.log or
 >>>>/var/log/rpmpkgs and then update/reinstall these packages.  I'm not

 >>>>sure if it will work, but it may be worth a try.

 >>>>Thanks,

 >>>>Dale


Hi,

I copied over the entire /var/lib directory from another machine that 
was configured like this machine. I then did 'rpm --rebuilddb'. I then 
got a whole list of packages with 'rpm -qa'. I was also able to get my 
partitions exported using nfs. However, I don't know if the rpm database

has been restored to its original self. I did a diff between 
/var/lib/rpm/Packages and /var/log/yum.log, and they differ. Am I right 
in comparing the two?

I also ran 'up2date --update' and 'yum update' just in case, and while 
up2date didn't update anything, yum returned one update, which I thought

normal (it updated ethereal).

Is there anything else I need to do to bring the system back in its 
original condition? Maybe reboot it?

Thanks for all the help so far.

Saurabh.











More information about the fedora-list mailing list