Migrating 32bit to 64bit Debian Lenny

Simon Matter simon.matter at invoca.ch
Wed Sep 2 11:56:26 EDT 2009


> Hi,
>
> I've seen some questions about migrating from 32 bit to 64 bit. We

Hi,

I understand that you also migrated to a newer OS and cyrus-imapd version,
right?

> migrated last weekend and these are the steps we took.
>
> Old server:
>     - rsync the cyrus data while cyrus is running
>        rsync -vaH --delete -e ssh /var/lib/cyrus/
> new-server:/var/lib/cyrus
>        rsync -vaH --delete -e ssh /var/spool/cyrus/
> new-server:/var/spool/cyrus
>        rsync -vaH --delete -e ssh /var/spool/sieve/
> new-server:/var/spool/sieve
>     - shut down cyrus
>     - repeat rsyncing of the three directories to provide stable
> environment and databases. This will be a lot faster than the original
> rsync.
>     - dump /var/lib/cyrus/mailboxes.db to a text file
>        /usr/sbin/ctl_mboxlist -d > mboxlist.txt
>     - copy this text file to the new server
>
> New server:
>     - make sure cyrus is shutdown
>     - switch to user 'cyrus'
>        su - cyrus
>     - remove some of the databases
>        rm /var/lib/cyrus/db/*
>        rm /var/lib/cyrus/db.backup1/*
>        rm /var/lib/cyrus/db.backup2/*
>        rm /var/lib/cyrus/deliver.db
>        rm /var/lib/cyrus/tls_sessions.db
>        rm /var/lib/cyrus/mailboxes.db
>     - build new mailboxes.db from mboxlist.txt file
>        /usr/sbin/ctl_mboxlist -u < mboxlist.txt
>     - check /var/log/mail.err and /var/log/mail.info for any errors
> from the above command and the following commands. There should only
> be one error about missing timestamp file but it is automatically
> created.
>     - run the following commands and check logs for errors
>        /usr/sbin/ctl_cyrusdb -r
>           - the above command will verify mailboxes.db and annotations.db
>        /usr/sbin/tls_prune
>           - the above command will create a new tls_prune database
>        /usr/sbin/ctl_cyrusdb -c
>        /usr/sbin/cyr_expire -E 3
>     - you can also run the squatter command but it doesn't really need
> to run until it's scheduled time. It takes a awhile to run.
>     - start cyrus and check that it is working correctly.
>     - you will need to reset any annotations (e.g.: expire) on
> mailboxes/folders. We didn't have any annotations set on mailboxes so
> I didn't try migrating that database.
>
> The database types are defined in /etc/imapd.conf. They don't appear
> in the default Lenny conf file since they use the predefined default
> types. The man page for imapd.conf lists those defaults:
> annotation_db: skiplist, duplicate_db: berkeley-nosync... The current
> database types are listed in /usr/lib/cyrus/cyrus-db-types.active.

I'm wondering how much of all this was really needed for the migration
from 32bit to 64bit? Are the BerkeleyDB ondisk files different on
32/64bit?

Because, the last migration I did was from RHEL3/32bit to RHEL5/64bit
using our own cyrus-imapd RPMs and the migration was as easy as stopping
cyrus-imapd, rsyncing /var/lib/imap + /var/spool/imap to the new box and
starting cyrus-imapd on the new box. Now, the RPMs do quite some magic on
the database files to make sure they are all skiplist after shutdown, and
switched back on startup. So my question remains, what parts of
cyrus-imapd are possibly arch dependant?

Regards,
Simon



More information about the Info-cyrus mailing list