problem upgrading mailboxes.db with cvt_cyrusdb : can't open old database / DBERROR db4: Program version 4.4 doesn't match environment version 0.5

Simon Matter simon.matter at invoca.ch
Tue Jan 9 12:15:26 EST 2007


>
> I'm just moving all emails from an old imap-2.0.16 to a new machine with
> version 2.2
>
> I copied all files from the old machine to the new machine and followed
> the
> instructions at:
>
> http://cyrusimap.web.cmu.edu/imapd/install-upgrade.html
>
> after performing the rehash-command I try to upgrade the mailboxes.db and
> seen-files with the cvt_cyrusdb-command as recommended, but I run into a
> strange
> error:
>
> as user cyrus I do:
>
> $ /usr/sbin/cvt_cyrusdb /data/cyrus/config/mailboxes.db berkeley
> /tmp/mailboxes.db.new skiplist
> Converting from /data/cyrus/config/mailboxes.db (berkeley) to
> /tmp/mailboxes.db.new (skiplist)
> fatal error: can't open old database
>
> in the logs I see:
>
> Jan  9 12:28:28 ihf2 cyrus/cvt_cyrusdb[19760]: DBERROR db4: Program
> version 4.4
> doesn't match environment version 0.5
> Jan  9 12:28:28 ihf2 cyrus/cvt_cyrusdb[19760]: DBERROR: dbenv->open
> '/data/cyrus/config/db' failed: DB_VERSION_MISMATCH: Database environment
> version mismatch
> Jan  9 12:28:28 ihf2 cyrus/cvt_cyrusdb[19760]: DBERROR: init() on berkeley
> Jan  9 12:28:28 ihf2 cyrus/cvt_cyrusdb[19760]: DBERROR: reading
> /data/cyrus/config/db/skipstamp, assuming the worst: No such file or
> directory
> Jan  9 12:28:28 ihf2 cyrus/cvt_cyrusdb[19760]: DBERROR db4: DB_AUTO_COMMIT
> may
> not be specified in non-transactional environment
> Jan  9 12:28:28 ihf2 cyrus/cvt_cyrusdb[19760]: DBERROR: opening
> /data/cyrus/config/mailboxes.db: Invalid argument
>
>
> To be frank : I seem doomed. I didnt find anything useful to my problem in
> the
> docs or on google. I dont even know if my original mailboxes.db-file is
> really
> in Berkeley-format. I tried to use '/usr/cyrus/bin/ctl_mboxlist -d
>  >/tmp/mailbox.db' on the old machine with gave me - as expected - the
> same
> mailboxfile. Its a binary-file with the mailbox-lists as ASCII somewhere
> in it
> with binary noise around.
>
> Converting the seen-files from flat to skiplist seems to work. I also
> tried to
> convert the mailboxes.db from flat to skiplist but then cvt_cyrusdb said
> that
> its appearently an empty file.
>
> Any suggestions?  Or is there maybe a workaround?  By reconstructing the
> mailboxes-files manually from the userdatabase (ldap-based). All users
> have the
> same permissions.

I think you have the BerkeleyDB problem which has been discussed on this
list again and again. Looks like your new box uses another BDB version and
your db files are in the wrong format. You have to somehow convert those
files to the version you need, there are tools to do that in the BDB
distribution I think. Otherwise try to convert to skiplist on the old
server, skiplist does not have the "BerkeleyDB" problem.

Simon


More information about the Info-cyrus mailing list