MLUG: [MLUG] Berkeley DB conversion
[MLUG] Berkeley DB conversion
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Just a note for anyone who needs a way to convert a Berkeley DB file from hash 
version 2 (DB 1.85) to version 7 (DB 4.*, RedHat 8). Webalizer and Evolution 
are among applications that use Berkeley DB. They will plainly refuse to open 
an older database.

Here's what the original file may look like:

$ file webalizer.dnscache.original
webalizer.dnscache.original: Berkeley DB 1.85 (Hash, version 2, native byte-order)

Quoting http://elib.cs.berkeley.edu/admin/BerkeleyDB/build/unix.html:

"If you need to convert Berkeley DB 1.85 (or earlier) databases to Berkeley DB 
2.0 databases, enter --enable-dump185 as an argument to configure. This will 
build the dump_185 utility. This utility will dump Berkeley DB 1.85 and 1.86 
databases in a format readable by the db_load utility. For more information, 
see db_dump and db_load."

So, doing

$ db_dump185 webalizer.dnscache.original | db_load webalizer.dnscache.new

seems to work (as far as my applications are concerned, anyway :)

$ file webalizer.dnscache.new
webalizer.dnscache.new: Berkeley DB (Hash, version 7, native byte-order)

db_* programs are part of db4-utils RPM on RedHat 8.

Cheers,
-- 
MK

_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members