(rpm)db 5.2 files

Jeffrey Johnson n3npq at me.com
Fri May 15 23:29:09 CEST 2015


On May 15, 2015, at 4:49 PM, Elan Ruusamäe wrote:

> i'm writing code to make minimal chroot of pld.
> 
> how to get rid of these files in safe manner, so they would not be missed, or not needing any kind of rpm db rebuild, /bin/rpm is just ready to be used:
> 
> /var/lib/rpm/log/log.0000000001
> /var/lib/rpm/__db.001
> ...
> 
> 
> i invoked:
> 
> # db5.2_load -r lsn /var/lib/rpm/Packages
> 
> 
> but that did not remove the files.
> 

Good: you are removing LSN's before copying Packages.

Note that log.* and __db.* files are not portable, having both bdbversion and arch-specific info.

Some mixture of these commands will make Packages portable for a chroot.

	dbXY_recover -v 		# remove ___db files

	dbXY_checkpoint -1	# create an empty commit

	dbXY_archive -d 		# remove unused log files

(my guess: if the LSN's are removed, then the last/empty log files will be removed)
Otherwise just remove log/* and try-and-see.

A --rebuilddb will recreate indices and regenerate log/* entries from rebuilding the indices

A final "dbXY_rebuild -e -v" will recreate __db* files.

hth

73 de Jeff


More information about the pld-devel-en mailing list