How Do I Invoke Berkeley Database 1.85 Compatibility Mode Under CentOS 5?

Dave Aiello asked:

I have been trying to work with databases that were created under Berkeley Database 1.85 so that I can convert them to MySQL.

I believe the files are Berkeley DB 1.85 under CentOS 5 for the following reasons:

bash-3.2$ file comment.db
comment.db: Berkeley DB 1.85/1.86 (Btree, version 3, big-endian)

bash-3.2$ uname -r
2.6.18-128.el5

I know that there is a Berkeley DB 1.85 Compatibility Mode, but I am not sure how to put it into effect.

When I run:

bash-3.2$ yum list installed

… I get the following results, among others:

compat-db.i386                       4.2.52-5.1                        installed

db4.i386                             4.3.29-10.el5_5.2                 installed
db4-devel.i386                       4.3.29-10.el5_5.2                 installed
db4-java.i386                        4.3.29-10.el5_5.2                 installed
db4-tcl.i386                         4.3.29-10.el5_5.2                 installed
db4-utils.i386                       4.3.29-10.el5_5.2                 installed

Are these the yum modules that we need to get Berkeley DB 1.85 Compatibility Mode to work? Or are there others?

Is there some configuration that needs to be done in order for this mode to be active?

Does DB_File pickup Berkeley DB 1.85 Compatibility Mode automatically?

My answer:


The db4_utils package contains db_dump185, which you can use to dump a DB 1.85 format database. You can send its output to db_load to load it into a current format database.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.