rpmdb [options] {--initdb|--rebuilddb}
rpmdb [options] {--verifydb}
rpmdb [options] {--exportdb|--importdb}
The rpmdb is used for rpm database maintenance operations.
--initdb
--rebuilddb
Can also be used to convert between different rpmdb formats.
--verifydb
--exportdb
--importdb
See rpm-common(8) for the options common to all rpm executables.
There are several configurables affecting the rpmdb operations, but in particular the following (see rpm-config(5) for details):
On success, 0 is returned, a nonzero failure code otherwise.
rpmdb --initdb --dbpath /tmp/testdb
rpmdb --rebuilddb
rpmdb --verifydb --root /mnt
rpmdb --exportdb > /tmp/headers
rpmdb --importdb --define "_db_backend ndb" --dbpath /tmp/newdb < /tmp/headers
See rpm-common(8) for the options common to all operations.
popt(3), rpm(8), rpm-common(8)
rpmdb --help - as rpm(8) supports customizing the options via popt aliases it's impossible to guarantee that what's described in the manual matches what's available.
http://www.rpm.org/