Re: Migrating IMAP from Cyrus v2.2.13 to Cyrus v2.4.17

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Cyrus friends,

Is imapsync not an option?

imapsync - IMAP synchronization, copy or migration tool.
Synchronize mailboxes between two imap servers.
Good at IMAP migration.

WWW: http://imapsync.lamiral.info/


On Wed, Apr 06, 2016 at 02:07:17PM -0500, John Wade via Info-cyrus wrote:
> 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:
> >
> >I read that.. but after 8 hours of trying to get it going I gave
> >up on it.
> >
> >I the debian 8 / Cyrus 2.5 stuff did not want to process the cyrus
> >2.4 db files from debian 6.
> >
> >You can say pretty words like: "may require support for whichever
> >backend you were using" but if all you have is access to apt-get
> >and you have two systems that are YEARS apart in what they have
> >setup.. how do you do this?  Tell me the apt-get install command
> >to run so that  ctl_cyrusdb -r works or it's just words.
> >
> >
> >jack
> >
> >
> >
> >On 04/06/2016 01:32 PM, Dan White wrote:
> >>On 04/06/16 13:20 -0500, Jack Snodgrass via Info-cyrus wrote:
> >>>Is there a documented process for taking a system from: Cyrus
> >>>v2.2.13 to Cyrus v2.4.17
> >>
> >>>I have rsync'd the mail between the two systems.
> >>>
> >>>/usr/lib/cyrus/bin/reconstruct did NOT magically convert the
> >>>system from the old to the new.
> >>
> >>>/usr/lib/cyrus/bin/reconstruct -G -f
> >>
> >>>The 'seen' flags and probably some other flags / acls are not working.
> >>
> >>Check the upgrade instructions here:
> >>
> >>https://cyrusimap.org/docs/cyrus-imapd/2.5.3/install-upgrade.php
> >>
> >>'ctl_cyrusdb -r' may require support for whichever backend you
> >>were using
> >>on the older version (on the new system), such as a legacy berkeleydb
> >>version.
> >
> >
> >-- 
> >*jack* - Southlake Texas - http://mylinuxguy.net
> ><http://mylinuxguy.net/> - *817-601-7338*
> >
> >
> >----
> >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
> 

> ----
> 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


-- 
Met vriendelijke groeten,
With kind regards,
Mit freundlichen Gruessen,
De jrus wah,

Will

*************************************
 W.K. Offermans

                                       Powered by ....

                                            (__)
                                         \\\'',)
                                           \/  \ ^
                                           .\._/_)

                                       www.FreeBSD.org
----
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



[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux