competition

Sebastian Hagedorn Hagedorn at uni-koeln.de
Wed Sep 22 03:12:14 EDT 2010


--On 22. September 2010 16:10:15 +1000 Bron Gondwana <brong at fastmail.fm> 
wrote:

> Now - BDB database SHOULD be upgradable.  I want to find a BDB expert
> to help me with that - (a) detecting that an upgrade is necessary, and
> (b) doing the upgrade.

I wouldn't exactly call myself an expert, but I think I understand the 
basics of BDB operation. The biggest problem is that there may be multiple 
version of the BDB utilities installed. So you need to know which BDB 
version Cyrus was linked against and somehow figure out what the 
corresponding tools are on the box you're on. The tool are named db_stat, 
db_verify, db_upgrade etc., but it's not unusual to have db41_stat, 
db42_stat etc .
The "file" utility is pretty useful, because it tells you the version of a 
BDB file. Unfortunately that version has nothing to to with the version 
number of the BDB libraries themselves. Instead they look like this:

Berkeley DB (Hash, version 8, native byte-order)

I suppose one could do this:
- at startup, create a new BDB hash file using a Cyrus binary
- check its version number using "file"
- compare that to the existing BDB files
- if they're different you need to perform an upgrade

The upgrade itself *should* be doable using db_upgrade (using the version 
that goes with the libraries Cyrus is linked against), although I think 
there are cases where you have to use db_dump followed by db_load. The 
problem with the latter is that you need the dump from the *old* version of 
the libraries!

> .... given the issues with BDB.  Is it worth embedding a copy of
> BDB into the Cyrus distribution rather than using the OS one?  I
> know it's generally considered bad taste, but it sure makes
> keeping in sync easier!

That would certainly help with the issues I described above, but only if 
you either also include the utilities or have your own binaries that 
fulfill their function.
-- 
     .:.Sebastian Hagedorn - RZKR-R1 (Gebäude 52), Zimmer 18.:.
                 .:.Regionales Rechenzentrum (RRZK).:.
.:.Universität zu Köln / Cologne University - ✆ +49-221-478-5587.:.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pkcs7-signature
Size: 5292 bytes
Desc: not available
Url : http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20100922/211ceec0/attachment.bin 


More information about the Info-cyrus mailing list