[pybsddb] Migration tool?
Jesus Cea
jcea at jcea.es
Sat Aug 2 17:52:47 CEST 2025
On 1/8/25 17:39, José María Mateos wrote:
> Hi,
>
> I've been testing the old bsddb3 library (on Python 3.6) for a project
> I'm writing and it works quite well. Thanks a lot for supporting this
> library.
>
> Recently, I've had to upgrade the Python version (to Python 3.11, for
> the time being), hence I installed the berkeleydb library.
>
> However, the files I created with bsddb3 are not compatible. See:
>
> ```
> db_cursor = berkeleydb.btopen('/path/to/file.db', 'c')
> ...
> DBInvalidArgError: (22, 'Invalid argument -- BDB1009 /path/to/file.db:
> unsupported btree version: 10')
>
> ```
>
> I have two questions about this:
>
> 1. Is there any tool to migrate old DBs to the newer version?
>
> 2. Is this kind of deprecation common, or I'm just encountering it
> because I made a large jump in versions? I see a lot of BerkeleyDB
> formats were dropped in the 18.1.0-pre announcement, so perhaps that's
> what I'm seeing here.
>
> Thanks a lot!
This is not related to the berkeleydb python bindings but to the
underlying Oracle BerkeleyDB database engine.
What version of Oracle Berkeley DB are you using?.
Using the old "bsddb3", do this:
>>> import bsddb3
>>> bsddb3.db.version()
Using the new "berkeleydb", do this:
>>> import berkeleydb
>>> berkeleydb.db.version()
Send the two results to the mailing list.
Migration is documented in the Oracle Berkeley DB manual. We can talk
about it when we know what versions are we talking about.
Have a nice weekend.
--
Jesús Cea Avión _/_/ _/_/_/ _/_/_/
jcea at jcea.es - https://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/
Twitter: @jcea _/_/ _/_/ _/_/_/_/_/
jabber / xmpp:jcea at jabber.org _/_/ _/_/ _/_/ _/_/ _/_/
"Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/
"My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://mailman.jcea.es/pipermail/pybsddb/attachments/20250802/3a5491f4/attachment.bin>
More information about the pybsddb
mailing list