rsync /old/server new/server ?
Shawn Heisey
elyograg at elyograg.org
Wed Mar 13 21:25:07 EET 2019
On 3/8/2019 4:44 AM, Voytek Eymont via dovecot wrote:
> I have Centos 7 with dovecot/postfix/mysql Maildir
>
> I want to bring in a new server, new server will have same hostname as
> current, but, different IP
>
> I was intending to
> rsync -avzhe ssh vmail at oldserver:/var/vmail/vmail1 /var/vmail/vmail1
>
> and, then, re run as necessary when/if mail still arrives on old server
>
> is that "a good plan" ...?
What I did when I migrated my mail service to a new server:
Preparatory steps:
* Made sure new server was set up.
* Tested functionality on new server as much as I could.
* Did occasional rsyncs (-avH --delete) of mail content from old server
to new server.
Three days before go time, I did this:
* Lowered the DNS TTL value for imap and smtp records to 300.
* Waited 3 days to be sure that TTL had penetrated the whole Internet.
On the day of the migration, these were the steps I followed.
* Shut down postfix and dovecot on both old and new servers.
* Updated DNS records to point to new address.
* Ran one final rsync of maildirs from old server to new server.
* Waited 30 minutes with services on both servers still shut down.
* Started postfix and dovecot on new server.
At this point you can set the DNS TTL back to a larger value, if you wish.
I waited 30 minutes just to be absolutely sure that the DNS change had
propagated everywhere. Ten minutes probably would have been enough; I
was just being cautious.
If you plan to keep the old server without doing a fresh OS install,
it's a good idea to wait a few days before restarting services on it.
In my case, I removed dovecot and reconfigured postfix on that machine
to be a satellite system relaying to the new server.
Thanks,
Shawn
More information about the dovecot
mailing list