Server migration
Karol Augustin
karol at augustin.pl
Mon Oct 24 09:23:27 UTC 2016
On 2016-10-24 8:00, Gandalf Corvotempesta wrote:
> can i simply use rsync to sync everything and, when the sync is quick, move
> the mailbox from the old server to the new server? My biggest concern is
> how to manage the the emails that are coming during the server switch.
>
> Let's assume a 50gb maildir , the first sync would require hours to
> complete (tons of very small files) do i can't shutdown the mailbox. The
> second sync would require much less time and would also sync the email
> received during the first sync (but the mailbox is still receiving new
> emails)
> now, as third phase, i can move the mailbox to the new server (by changing
> the postfix configuration) so that all new emails are received on the new
> server and then start the last rsync (by removing the --delete flag or any
> new emails would be deleted as not existsnt on the older server)
>
> Any better solution?
When I am doing this I just turn off both servers for the third sync.
Its short enough to not cause much problem. And then after third sync I
start the new server and all clients can connect to it so I also
mitigate any problems resulting from clients that would be still
connected to the old server. The last issue depends on the way you force
everyone to use new server (DNS, routing, etc).
Remember that beside the new emails that could arrive during sync you
have also all sorts of user-generated operations as move, delete etc. So
if you just do 3rd rsync without --delete you can end up duplicating
users' emails if they move them during procedure.
Best,
Karol
More information about the dovecot
mailing list