Simon Matter
2002-09-17 06:34:40 UTC
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.
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.
compiled. Is there another way to get this info than using cyradm. The
problem is that cyradm needs authentication and that's something I can't do
here.
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.
"\241\002\213\015skiplist file\0\0\0"
Flat file should be fairly easy to recognize ('file' should be able to
do this for you), since it is just plain text.
"\241\002\213\015skiplist file\0\0\0"
Berkeley DB should be anything else.
wont the file command produce different answers ? Well tell you oneis data and the other is a database.
[***@client134 db]# file mailboxes.db
mailboxes.db: Berkeley DB (Btree, version 8, native byte-order)
But I don't consider this safe because Berkeley DB files could change, don't
they?
(and just for a laugh )
add to magic file.
#Cyrus skiplist file
4 string skiplist\ file Cyrus skip list
add to magic file.
#Cyrus skiplist file
4 string skiplist\ file Cyrus skip list