Hi Jack, You should be able to export the mailboxes database on the old server to text and then import on the new server. In package of cyrus we are running, the DB export is actually done daily automatically. Here is an approximation of what we did last time we did a server/version migration, may have cut some steps to sanitize/simplify: ## Copy Mail spools on a nightly basis until conversion: #On old server: vi /root/mailtools/rsyncmailspools.sh ------------------------------------------------------------------------------------ #!/bin/bash date echo "syncing spool 0" rsync -Haz --delete-after -e ssh /var/spool/imap/0/ cyrus@newserver:/var/spool/imap/0/ echo "end spool 0" date echo "syncing spool 1" rsync -Haz --delete-after -e ssh /var/spool/imap/1/ cyrus@newserver:/var/spool/imap/1/ echo "end spool 1" date echo "syncing spool 2" rsync -Haz --delete-after -e ssh /var/spool/imap/2/ cyrus@newserver:/var/spool/imap/2/ echo "end spool 2" date echo "syncing spool 3" rsync -Haz --delete-after -e ssh /var/spool/imap/3/ cyrus@newserver:/var/spool/imap/3/ echo "end spool 3" date echo "syncing spool 4" rsync -Haz --delete-after -e ssh /var/spool/imap/4/ cyrus@newserver:/var/spool/imap/4/ echo "end spool 4" date -------------------------------------------------------------------------------------- # run it (Cyrus user has authorized_keys file on newserver) /root/mailtools/rsyncmailspools.sh # cron to sync spools crontab -e # set up rsync to sync mail spools until final cutover 00 18 * * * /root/mailtools/rsyncmailspools.sh #At time of conversion (or can be done for testing) # On oldserver: #cd /var/lib/imap su - cyrus /usr/cyrus/bin/ctl_mboxlist -d >mailboxes.oldserver.text exit # newserver rsync -av -e ssh cyrus@oldserver:/var/lib/imap/mailboxes.oldserver.text /var/lib/imap su - cyrus cd /var/lib/imap rm -f /var/lib/imap/mailboxes.db* /usr/lib/cyrus-imapd/ctl_mboxlist -u < /var/lib/imap/mailboxes.oldserver.text # Confirm it by dumping back: /usr/lib/cyrus-imapd/ctl_mboxlist -d > /var/lib/imap/mailboxes.newserver.text cat mailboxes.newserver.text # Confirm the above file looks OK; then delete it: rm /var/lib/imap/mailboxes.newserver.text exit # move over all sieve scripts rsync -Havz --delete-after -e ssh cyrus@oldserver:/var/lib/imap/sieve/ /var/lib/imap/sieve # move over all seen, sub files rsync -Havz --delete-after -e ssh cyrus@oldserver:/var/lib/imap/user/ /var/lib/imap/user # move over quota files rsync -Havz --delete-after -e ssh cyrus@oldserver:/var/lib/imap/quota/ /var/lib/imap/quota # fix ownership chown -R cyrus:mail /var/lib/imap ## Start mail and hope Enjoy, John On 4/6/2016 1:39 PM, Jack Snodgrass via
Info-cyrus wrote:
|
---- Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus