Updating the OKS database

Adding a large number of keys to your database or merging thousands ones can be extremely tedious with the regular OpenKeyServer gateways. To make this operation easier, a small database tool is provided in the binary directory of your keyserver to parse PGP keyrings and add missing or merge already existing ones into your database.

This operation can be done via the following commands:

# cd /usr/local/oks/bin
# ./oksdb_update sample /usr/local/oks/var/db /tmp/pubring.pgp
Adding new keys to the OpenKeyServer database... Done!
Updating existing keys in the OpenKeyServer database... 45%

The database name and directory are the same as specified in the OKS database server configuration file and the last argument is the path to your public PGP keyring to add or merge.

As you can see, the oksdb_update tool first adds missing public keys to the database and then updates existing ones. Note that the second operation is only needed when at least one key found in the keyring is present in the database.

It is necessary to shutdown the OKS database server before updating its database.