updating cyrus databases

Simon Matter simon.matter at invoca.ch
Sat Mar 26 06:33:29 EDT 2011


> On 3/23/11 12:56 AM, Simon Matter wrote:
>>> Hello,
>>>
>>> I need to update my databases from 4.2 to 4.7. Unfortunately the guide
>>> I
>>
>> I see, you mean updating BerkeleyDB.
>>
>>> used last time to update my database has disappeared. All of the stuff
>>> I
>>> find currently on the web says just use cvt_cyrusdb to update your
>>> database. Which seems pretty straight-forward when I look at the man
>>> page, but then when I look at my cyrus directory, I get nervous. Which
>>> files exactly, am I suppose to update? There are so many with db at the
>>> end, do I do them all?
>>>
>>> ella:~# ls /var/cyrus/data/
>>> annotations.db  db.backup1  deliver.db  mailboxes.db   msg   quota
>>> tls_sessions.db
>>> db              db.backup2  log         mailboxes.db~  proc  socket
>>> user
>>> ella:~# ls /var/cyrus/data/db
>>> __db.001  __db.002  __db.003  __db.004  __db.005  log.0000000048
>>> skipstamp
>>>
>>> So, everything with a db in it? And what exactly is<old-fileformat>
>>> and<new-fileformat>? Is that the DBEngine from
>>> lib/cyrus/cyrus-db-types.active? So, BerkeleyDB4.2 and  BerkeleyDB4.7?
>>>
>>> And once I'm done, I move the old ones out, rename the new ones to the
>>> old names, get rid of lib/cyrus/cyrus-db-types.active, and reconfigure
>>> the package?
>>>
>>> If someone has a link to a guide that has more info than the ones I
>>> have
>>> found so far, that may be the easiest thing.
>>
>> I'm not sure you can upgrade BDB using cvt_cyrusdb directly. I think you
>> can only do it by exporting to a neutral formal like skiplist, then
>> updating BDB, and the converting the db's back to BDB. Another way
>> should
>> be to use the BDB upgrade tools for this.
>>
>> However, why don't you just get rid of BDB so you don't have to care
>> about
>> it in future? Any reason you can't convert to skiplist and leave BDB
>> behind? If you're running a recent Cyrus version then that's strongly
>> recommended and makes life much easier.
>>
>> Simon
>>
>
> Sorry, took a while to get back to this. I'm not sure why you think I am
> not using skiplist. This file seems to say I am.

What I meant was running skiplist only, then you don't have to worry about
BerkeleyDB anymore.

The lines below (and also the case that you are using am old version)
indicate that you are running Debian? So there may be Debian specific
instruction which may not be found on the Cyrus site.

>
> ella:~# cat /usr/lib/cyrus/cyrus-db-types.active
> ANNOTATION skiplist
> DBENGINE BerkeleyDB4.2
> DUPLICATE skiplist
> MBOX skiplist
> PTS berkeley
> QUOTA quotalegacy
> SEEN skiplist
> SUBS flat
> TLS berkeley-nosync
>
> Also, the directions for upgrading a database, found here:
>
> http://www.cyrusimap.org/docs/cyrus-imapd/2.2.13p1/install-upgrade.php
>
> under:
>
> Upgrading from 2.1.x or earlier
> General information (ALL SITES)
>
> give instructions for using the cvt_cyrusdb program to convert the
> databases to skiplist:
>
> /usr/cyrus/bin/cvt_cyrusdb /var/imap/mailboxes.db berkeley
> /var/imap/mailboxes.db.new skiplist
> mv /var/imap/mailboxes.db.new /var/imap/mailboxes.db
>
> and the files appear to look exactly the same when you are done as when
> you start.

Yes, they look the same but they should not be the same. Check with the
file command to see what they contain.

>
>  From the instructions on that page, it looks like I am suppose to use
> the command on everything with a db at the end, and then on the seen

Yes, everything with a .db at the end is usually a Cyrus DB.

> state database. I'm just not sure about the other stuff like __db.001 or

Those are the files in $CONFIG/db/ right? They are used by the different
DB engines internally. You should be able to remove those file or just
ignonre them if the DB's are in a sane state.

Simon

> the sub files in the same directory as the seen file. Furthermore, these
> instructions are for an earlier cyrus version then I have (2.1.x vs.
> 2.2.13), so I'm not even sure this is what I am suppose to be doing.
>
> thanks,
> maria
>




More information about the Info-cyrus mailing list