Restoring Mailboxes

Dr. Harry Knitter harry at knitter-edv-beratung.de
Thu Apr 20 04:35:58 EDT 2006


Am Mittwoch, 19. April 2006 18:27 schrieb Andrew Morgan:
> On Wed, 19 Apr 2006, Dr. Harry Knitter wrote:
> 
> > Am Mittwoch, 19. April 2006 15:27 schrieb jkp at solnet.homeip.net:
> >>> Hello,
> >>>
> >>> we have a problem to restore Cyrus mailboxes from an installation of 
SuSE
> >>> 9.2
> >>> which we want to transfer do a SuSE 10.0 installation.
> >>> We have backuped the directories /var/lib/imap and /var/spool/imap and
> >>> copied
> >>> them to the new installation.
> >>> after restarting Cyrus syslog was flooded with messages
> >>>
> >>> <snip>
> >>>
> >>
> >> Seems you have a mismatch in version numbers between your old Berkeley 
DB4
> >> installation and your new installation. The problem is that your old .db
> >> files (in db4.xx) is not compatible with your new Berkeley installation.
> >>
> >> Albeit "cumbersome" you can fix it if you still have the old server
> >> available where you need to run cvt_cyrusdb on each file being stored in
> >> Berkeley database format. The easiest way to find those files is probably
> >> just to run a
> >>
> >>   find /var/lib/imap |xargs file|grep -i berkeley
> >>
> >> And then manually convert those files to flat format doing:
> >>
> >>   cvt_cyrusdb /your/berkeley_db4.db berkeley /your/berkeley_flatfile flat
> >>
> >> Then copy the files to your new installation and covert them back to
> >> Berkeley with your new berkeley db4 format (cumbersome but needed step)
> >>
> >>
> >> Good luck,
> >>   Best regards,
> >>      Jesper K. Pedersen
> >
> > Doesn´t sound very good.
> > The old server does not exist anymore.
> > On the other side I have a server that was upgraded and seems to use the 
old
> > file format. How can I find out what version of Berkeley DB this cyrus is
> > using?
> > Or are there any tools to do this without cyrus?
> 
> You could also try deleting the files in the configdirectory/db/ directory 
> (make a copy to be safe).  Those are the transaction logs, etc, for 
> BerkeleyDB and skiplist.  They should be safe to delete because the actual 
> information is in the mailboxes.db file.
> 
>  	Andy

Could you please give me a hint what you mean with configdirectory?
In my case (SuSE 10.0 as well as 9.2) I found a subdirectory db 
in /var/lib/imap the directory where the database seems to be located.
There is a directory deliverdb with a subdirectory db in the same place.
As having copied the whole directory /var/lib/imap including subdirectories  
from the old installation to the new one I cant´t imagine that these old 
directories are the cause of a changed Berkeley DB version.

Regards 

Harry



More information about the Info-cyrus mailing list