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

Reply via email to