2.3, bsddb and 1.85 compatibility
skip at pobox.com
Mon Feb 3 13:55:57 CET 2003
Christos> I found out that some btree files I had created with 2.2.2
Christos> bsddb.btopen are no longer valid for the bsddb.btopen of 2.3
Christos> ... Is there any way to use them without doing a conversion?
Apparently you have multiple versions of Berkeley DB installed on your
system and you were using version 1.85 or 2.x prior to building Python 2.3.
The different versions of the library each have a corresponding db_dump and
db_load program. If you really have 1.85 installed on your system, one of
the later versions will have to have been installed with 1.85 comatibility
(and I believe the utilities are named db185_dump and db185_load). To
convert your database, dump it with the db_dump version which corresponds to
your old version, say:
db185_dbump mybtree.db > mybtree.text
then reload it with the db_load file appropriate to your new version, say:
db_load mybtree.db.new < mybtree.text
Then verify that you can read the database using Python 2.3. Once you're
mv mybtree.db mybtree.db.old
mv mybtree.db.new mybtree.db
chmod -w mybtree.db.old
An alternative is to reenable the old bsddb module. You will have to edit
Modules/Setup.py to do this.
More information about the Python-list