Upgrading cyrus

Dan White dwhite at olp.net
Fri Sep 10 20:43:06 UTC 2010


On 10/09/10 15:18 -0500, Patrick Goetz wrote:
>Hi -
>
>I never responded to this. Although I *think* most people will want 
>to upgrade their hardware at the same time that they upgrade their 
>mail server software (hardware is cheap after all, and labor is 
>expensive) I suppose I could be wrong about this.  But in any case I 
>didn't think about the case of murder installs.
>
>(Thinking out loud) since cyrus uses the filesystem as the message 
>database, it seems to me that upgrading from one version of cyrus to 
>another really just boils down to upgrading the Berkeley DB files 
>/var/lib/cyrus from libdbN to libdb(N+K).
>
>To this end, it would be helpful to have some documentation on what 
>these files are/do.  Appended below is an email exchange I had with 
>someone back in 2004 about this.  I thought maybe this would now be 
>more thoroughly documented in the Cyrus wiki, but it looks like the 
>Cyrus web pages have been updated and now I can't even find the Wiki 
>any more -- anyone have any idea what happened to this?

It might make sense to take a page from the OpenLDAP package, which on
upgrade does:

# ===== Dumping and reloading using LDIF files =========================
# {{{
#
# If incompatible changes are done to the database underlying a LDAP 
# directory we need to dump the contents and reload the data into a newly
# created database after the new server was installed. The following
# functions deal with this functionality.


Which goes on to use the slapcat utility to convert the native format (e.g.
Berkeley) into a portable LDIF, then reloads under the upgraded version.

That should work for cyrus, and its cvt_cyrusdb utility, by converting to a
temporary flat file for each database and then converting back (with lots
of testing of course). I would not bother converting duplicate_db,
tls_cache, and pts_cache.

Note that you don't have any preknowledge about the format of any database
without referencing /etc/imapd.conf. The database format type may have been
customized.

-- 
Dan White



More information about the Pkg-Cyrus-imapd-Debian-devel mailing list