Berkeley DB upgrade?

Paul Boven p.boven at chello.nl
Tue Jul 11 07:57:27 EDT 2006


Hi everyone,

I'm planning an upgrade from a Cyrus-2.2.8 to Cyrus-2.2.12. However, we 
will also be upgrading Berkeley from 4.1.25 to 4.4.20 because of some 
performance issues with the first.

So now I'm wondering: should I call db_upgrade from Berkeley on each of 
these databases? And which databases exactly would that be? This is a 
stock standard 2.2.8, with no specific backends mentioned in the 
imapd.conf or compiled in. What are the filenames/locations where I 
should find Berkeley db files?

Some candidates:
/var/imap/mailboxes.db - but Berkeley-db fails to recognise that file, 
so I can't dump it.
/var/imap/annotations.db - same problem.

/var/imap/tls_sessions.db is a Berkeley db-file, but one I could afford 
to wipe during the upgrade.

/var/imap/deliver.db is a Berkeley db-file, but also one I could affort 
to wipe.

What exactly lives in the directory /var/imap/db ?
Which is Berkeley, and which isn't? Mine contains:
-rw-------   1 cyrus    mail       24576 Jul 11 13:19 __db.001
-rw-------   1 cyrus    mail     4374528 Jul 11 13:19 __db.002
-rw-------   1 cyrus    mail      663552 Jul 11 13:19 __db.003
-rw-------   1 cyrus    mail       98304 Jul 11 13:19 __db.004
-rw-------   1 cyrus    mail     17563648 Jul 11 13:19 __db.005
-rw-------   1 cyrus    mail       32768 Jul 11 13:19 __db.006
-rw-------   1 cyrus    mail      642407 Jul 11 08:31 log.0000000001
-rw-------   1 cyrus    mail           4 Jul 11 13:19 skipstamp

There's also /var/imap/user/*/*.seen which are some kind of database, 
and /var/spool/imap/user/.../cyrus.{header,index.cache}.

On a test-machine, I've tried the following:
Stop cyrus, do a Berkeley db_upgrade on the databases I identified as 
being Berkleley, then restart it. But this has failed completely, 
starting up Cyrus results in:

ctl_cyrusdb[4975]: [ID 866726 local6.warning] DBERROR :db4
ctl_cyrusdb[4975]: [ID 864961 local6.crit] DBERROR: critical database 
situation
master[4971]: [ID 310780 local6.debug] process 4975 exited, status 75

Obviously, some part of Berkeley is unhappy - but I can't pinpoint what 
or where. Any hints are very much welcome.

Regards, Paul Boven.


More information about the Info-cyrus mailing list