KSdbConsist

KSdbConsist must be run when upgrading to KeyServer 8.0 from any earlier major version (e.g. 7.7, 7.2, 6.2, etc) in order to transform various database files to the new 8.0 format. KSdbConsist is run automatically as part of an install or upgrade of the KeyServer component and it can also be run manually at any time whenever the KeyServer process has been stopped. KSdbConsist is designed to do an extensive set of tests to ensure consistency within the various databases contained in the KeyServer Data Folder. It will repair any errors which it finds and also it may warn of configuration issues that should be cleaned up using the KeyConfigure interface. There is an optional feature that allows you to split off old usage records (concerning events prior to a specific date) from the Usage log file.

Running KSdbConsist

KSdbConsist cannot be run on an active data folder and it must be run with admin privileges so it can read and write in the target KeyServer Data Folder. By default, KSdbConsist is pointed to the KeyServer Data Folder in the standard install location. Assuming this is the data you want to inspect and repair, you must stop the KeyServer process before launching KSdbConsist. Alternately, KSdbConsist lets you browse to select an offline Data Folder stored anywhere in your local file system.

Once a data folder has been chosen (either by default or explicitly), KSdbConsist will display an approximate guess for how long the checks will take. Depending on what data problems are encountered, the actual time may be longer or shorter than the estimate. Canceling KSdbConsist before it has completed will leave all original data in place without modification. KSdbConsist always creates a date stamped folder and activity report (.ksr) inside the Backup Folder (within the KeyServer Data Folder). In the case where a data file was repaired, the corresponding, original, untouched data file is moved into this same folder along with the report. The worst case disk space requirement (repair all the data files) can therefore be estimated by totaling the size of all top level files in the KeyServer Data Folder - excluding all sub-folders.

KSdbConsist Window

OS X

Since KeyServer runs as root, and the various databases are owned by root, KSdbConsist will ask for admin authentication when it starts up.

Windows

KSdbConsist should be run from the same account which runs KeyServer. The KeyServer process (ks.exe) normally runs as a service, so KSdbConsist should be run from an admin account.

Linux

On Linux, KSdbConsist does not exist with a user interface. Instead, there is a command line version named “dbconsist”, which has exactly the same functionality. Run this from the terminal with the following command:

dbconsist -k "/usr/local/k2/KeyServer Data Folder"

If you ave installed KeyServer in a different directory, you will need to modify this command to indicate the correct location of your KeyServer Data Folder. Run the command as root (or with an account that has sufficient privileges to read and write the files in the KeyServer Data Folder.

Calling the binary with no parameters will output the help. Note that for archiving usage data the date format is YYYYMMDDHHMMSSL where the L indicates use Local time zone.

Output

KSdbConsist will show a summary once it completes all tests. Usually the summary will either say that there were no errors, or that some errors were fixed. If KSdbConsist notices a large number of errors, or certain serious errors, it will advise you to contact Sassafras Software Support for further advice. In all cases, KSdbConsist will write a .ksr file which contains detailed information on everything it found and fixed. This file can be found within a sub-folder named "dbconsist ..." inside the Backup Folder (in the KeyServer Data Folder) . This "dbconsist ..." folder will also contain the unaltered originals of any files which were copied and repaired.

Cases requiring additional attention

KSdbConsist can fix almost any error it notices. However, there are a few cases that require additional actions by the administrator.