Discussion:
Migrating from 2.0.x to 2.2
Jens Dueholm Christensen
2014-09-05 09:54:29 UTC
Permalink
Hi

I'm about to migrate a setup with <20 IMAP (but with a few million mails in all) accounts that belong to the same system-user on an older machine running Dovecot 2.0.13 to a new machine running Dovecot 2.2.13 (or possibly newer..).

Mails are stored in Maildirs with no special or advanced features (like alternate storage etc etc).
Filesystems are prepared for the expected amount of inodes required, and for the time beeing a change to mdbox is seen as an added complexity.

One requirement of the migration is that messageID is not changed - mails are referenced by other systems that expect to find individual mails by the ID.

Since dsync is incompatible between 2.0<->2.1<->2.2 what is the best way to perform this migration?

I was hoping of rsync'ing all Maildirs from the old machine to the new one (including indexes etc etc) and power up Dovecot 2.2.x and see what happens, but is that possible or is there another (and better) way short of installing 2.0.x on the new machine, rsync everything and then upgrade to 2.2.x?

Regards,
Jens Dueholm Christensen
Reindl Harald
2014-09-05 09:58:24 UTC
Permalink
Post by Jens Dueholm Christensen
Since dsync is incompatible between 2.0<->2.1<->2.2 what is the best way to perform this migration?
I was hoping of rsync'ing all Maildirs from the old machine to the new one (including indexes etc etc) and power up Dovecot 2.2.x and see what happens, but is that possible or is there another (and better) way short of installing 2.0.x on the new machine, rsync everything and then upgrade to 2.2.x?
use rsync!

especially because it is fast after the first "hot sync"
and you can repeat the sync, look if all is fine and
after you are sure config and data are OK

* stop services on both machines
* rsync a last time
* start services on the new machine
* change IP or DNS

well, and since you don't change data on the old one you
have a untouched backup there




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://dovecot.org/pipermail/dovecot/attachments/20140905/51af3b81/attachment.sig>
Jens Dueholm Christensen
2014-09-05 11:43:44 UTC
Permalink
From: Reindl Harald on Friday, September 05, 2014 11:58 AM
Post by Reindl Harald
Post by Jens Dueholm Christensen
I was hoping of rsync'ing all Maildirs from the old machine to the new one (including indexes etc etc) and power up
Dovecot 2.2.x and see what happens, but is that possible or is there another (and better) way short of installing 2.0.x
on the new machine, rsync everything and then upgrade to 2.2.x?
use rsync!
Allright!
I just had to make sure where were no obvious incompatibility issues when changing from an older version of Dovecot..

Sometimes (in other systems) there might be a datastructure or something else thats problematic..
Post by Reindl Harald
* stop services on both machines
* rsync a last time
* start services on the new machine
* change IP or DNS
That is exactly the plan..
Post by Reindl Harald
well, and since you don't change data on the old one you have a untouched backup there
Regards,
Jens Dueholm Christensen?
Michael Grimm
2014-09-05 11:44:32 UTC
Permalink
Post by Jens Dueholm Christensen
Filesystems are prepared for the expected amount of inodes required,
and for the time beeing a change to mdbox is seen as an added
complexity.
With that amount of mails in mind, a migration to mdbox is a good idea,
IMHO.
Post by Jens Dueholm Christensen
One requirement of the migration is that messageID is not changed -
mails are referenced by other systems that expect to find individual
mails by the ID.
Since dsync is incompatible between 2.0<->2.1<->2.2 what is the best
way to perform this migration?
IIRC dsync can be run independently from a running dovecot server. If
that is correct, then you could install dovecot 2.2 at the old server,
and use that dsync 2.2 for migration to the new server by simultaneously
changing the mail storage format. Again, IIRC, all your message IDs
shouldn't be modified during that approach.

Just give it a try ;-)

Regards,
Michael
Michael Grimm
2014-09-05 12:00:09 UTC
Permalink
Post by Michael Grimm
IIRC dsync can be run independently from a running dovecot server.
I remembered correctly (http://wiki2.dovecot.org/Tools/Dsync):

| dsync can be run completely standalone. It doesn't require any
| Dovecot server processes to be running, except when using -u parameter
| to do a userdb lookup from auth process.

Regards,
Michael

Loading...