Migrating 32bit to 64bit Debian Lenny

Bill Cameron billcamer at gmail.com
Wed Sep 2 11:19:12 EDT 2009


Hi,

I've seen some questions about migrating from 32 bit to 64 bit. We
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.

We had to take the server off-line to migrate some other applications
on the server so I didn't use imapsync. We are using imapsync to
migrate from Lotus Notes to cyrus.

Bill C.


More information about the Info-cyrus mailing list