[Dovecot] Easy migration from Dovecot 1.2.16 ppc maildir to 2.1.17 amd64 mdbox

Philippe Lelédy dovecot at leledy.fr
Sat Dec 7 06:12:03 EET 2013


Hi

After 
http://retrospekt.dk/2011/08/migrating-maildir-to-dovecot-2-0-dbox/ I 
used a two phases process.

The first, transfering over the network, is done by this shell function, 
on the *new* server. The argument is the <user>

fetchOldServer () {
   rsync -poazuHK --exclude="**/dovecot.index*" \
   -e ssh root at oldServer:/var/mail/Maildirs/$1 /var/mail/oldServer/
}

I had to add --exclude="**/dovecot.index*" because of a change of 
endianness (ppc -> amd64).

the second, having dovecot import the folder, is done by this second 
fonction

dsync () {
         doveadm backup -R -u $1 at mondomaine.fr 
maildir:/var/mail/oldServer/$1
}
this one is really fast.

Both in one function

doveImport() { fetchOldServer $1 && dsync $1 }

I tried for initial load to empty mailbox. I am not sure it will works 
on a non empty mailbox. But would be nice, as it would allow a fast last 
minute sync before switch, minimizing downtime.

Ph. Le


More information about the dovecot mailing list