How to determine format of .db files

Rob Siemborski rjs3 at andrew.cmu.edu
Mon Sep 16 16:42:39 EDT 2002


On Mon, 16 Sep 2002, Simon Matter wrote:

> Sorry, I didn't express myself well. I mean what is the best way to determine
> the format of existing db files. When converting db file with cvt_cyrusdb,
> one has to know the format of the source files and I want to determine this
> file format automagically.

Well, if it only has to work with the current databases...

Flat file should be fairly easy to recognize ('file' should be able to
do this for you), since it is just plain text.

skiplist should start with the following magic string:
"\241\002\213\015skiplist file\0\0\0"

Berkeley DB should be anything else.

-Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Rob Siemborski * Andrew Systems Group * Cyert Hall 207 * 412-268-7456
Research Systems Programmer * /usr/contributed Gatekeeper






More information about the Info-cyrus mailing list