I’ve got running a Cyrus IMAP mail server with an EXIM4 as MTA . Unfortunately after an system upgrade from Ubuntu Karmic Koala 9.10 onto Lucid Lynx aka 10.04 LTS Server my Cyrus refuses to start. It prompts at the console:
/etc/init.d/cyrus2.2: Database backends mismatch! You must manually /etc/init.d/cyrus2.2: verify and update the Cyrus databases to the /etc/init.d/cyrus2.2: new backends. /etc/init.d/cyrus2.2: Please refer to /usr/share/doc/cyrus-common-2.2/README.Debian /etc/init.d/cyrus2.2: for instructions.
Attention: Before you proceed. Do a:
cd /var/lib tar cfvz cyrus-backup.tgz cyrus
Quickly I’ve found a solution on the Internet, which – and that’s the bad part – didn’t work for me. I’ve followed these steps:
cd /var/lib/cyrus rm db/* rm db.backup1/* rm db.backup2/* rm deliver.db rm tls_sessions.db sudo -u cyrus ctl_mboxlist -d > /tmp/mailboxes.txt mv mailboxes.db mailboxes.db.old cvt_cyrusdb /tmp/mailboxes.txt flat /var/lib/cyrus/mailboxes.db skiplist rm /usr/lib/cyrus/cyrus-db-types.active sudo chown -R cyrus:mail /var/lib/cyrus dpkg-reconfigure cyrus-common-2.2
on this site http://www.elkin.de/index.php. Look here for ‘Database backends mismatch!‘, I can’t link to this page directly – highly praised are here the modrewrite thingie from Apache! and the gorgeous skills of the webmaster 😉 SCNR.
Don’t know what exactly went wrong, but at the first glance the above described procedure seemed to work, because cyrus did start up, and I’ve got a successful connect from my Thunderbird mail client. Only a few minutes later I realized, that the mail folder were all empty. Because I did the backup thing in the first place, I had nothing to fear and removed the whole
/var/lib/cyrus directory and restored my backup files:
tar xfvz cyrus-backup.tgz.
Right after I’ve done this at the console, my Thunderbird started to fill all my mailbox folders!
Maybe there’re experts out there, who can tell me exactly what was going on, but it’s sufficient for me to have a working mail server again.
Please refer to /usr/share/doc/cyrus-common-2.2/README.Debian
must be a joke, I’ve found no solution for my problem there – it was a waste of time – or did I miss something?
Don’t delete (–purge) cyrus unless you’ve backed up your mail archive. The archive is stored in /var/spool/cyrus.
Don’t think you do have a working mondo backup – you don’t 😉 but that’s another story.
Another error occurred after upgrading from Lucid (10.04LTS) onto Precise (12.04LTS):
<code>Dec 9 10:49:15 localhost cyrus/lmtpunix: DBERROR: opening /var/lib/cyrus/deliver.db: cyrusdb error Dec 9 10:49:15 localhost cyrus/lmtpunix: FATAL: lmtpd: unable to init duplicate delivery database Dec 9 10:49:15 localhost cyrus/master: about to exec /usr/lib/cyrus/bin/lmtpd Dec 9 10:49:15 localhost cyrus/lmtpunix: DBERROR db5: /var/lib/cyrus/db/__db.001: No such file or directory Dec 9 10:49:15 localhost cyrus/lmtpunix: DBERROR: dbenv->open '/var/lib/cyrus/db' failed: No such file or directory Dec 9 10:49:15 localhost cyrus/lmtpunix: DBERROR: init() on berkeley Dec 9 10:49:15 localhost cyrus/lmtpunix: DBERROR: reading /var/lib/cyrus/db/skipstamp, assuming the worst: No such file or directory Dec 9 10:49:15 localhost cyrus/lmtpunix: executed Dec 9 10:49:15 localhost cyrus/lmtpunix: skiplist: invalid magic header: /var/lib/cyrus/deliver.db Dec 9 10:49:15 localhost cyrus/lmtpunix: skiplist: closed while still locked
Here I found a straight-forward solution which did work for me: http://blog.controlunlimited.net/?p=62