Corrupted rpmdb recovery

Ovidiu Lixandru ovidiu at linux360.ro
Wed Feb 8 16:11:33 UTC 2006


Jim Cornette wrote:

> If you know what the missing 900 packages are, I believe enabling the 8 
> repos and choosing install instead of upgrade might be your best answer 
> when going through the list you have. I believe using --force is not 
> needed.
> Yum is a dep solver and should pull in the missing from the rpm database 
> files again. Ii will not know the packages are not installed so will 
> overwrite your files for non-configuration files. For configuration 
> files, it will make an .rpmnew or similar named file.
> 
> Looking at /var/log/rpmpkgs the listings are on one line at a time. What 
> you could do is run an rpm -qa |sort >~/my-100.rpms and compare them to 
> the log and manually removing the missed entries or get a diff between 
> the log and the file that you generated and install the differences file 
> feeding it to yum install.
> 
> This is an idea that I think will work for you. I do not know the 
> specifics if uniq or diff would be your best option to create the 
> missing 900 list. There are some pretty crafty people on the list who 
> could explain how to get you your 900 database entries back if by 
> needing to install alll the packages again, which I'd personally do or 
> to just reclaim the db entries as you suggested. The mirrors might be 
> happier if you could just pull down the rpm database entries again.

Thanks Jim,
I followed your suggestions and got almost all of the packages back into 
rpmdb. I made a diff between the old rpmpkgs and the almost empty rpmdb, 
edited it and removed the common files, then fed it to yum. The result:

[ovidiu at prometheus ~]$ rpm -qa | wc -l
1002

Mission accomplished.
Thanks again to all.

-- 
Ovidiu Lixandru
linux360
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5653 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20060208/b51545a7/attachment-0001.bin>


More information about the fedora-list mailing list