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@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" ...?
TIA, V
On 8.3.2019 13.44, 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@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" ...?
TIA, V
Yeah, it's ok as long as you haven't switched to new server.
Aki
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@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
On 13 Mar 2019, at 13:25, Shawn Heisey via dovecot <dovecot@dovecot.org> wrote:
- 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.
Except for the third minute delay, this is exactly what I did. (I brought the new server up as soon as the sync finished, which was only a few minutes since I'd been syncing frequently. I did leave the OLD server IP offline for awhile after bringing up the new one.
I also did not wait 3 days after lowering the TTL which was set to 1 day. I waited about a day and a half, maybe a bit less.
What you do not want to do is run the two servers at the same time, which is what it sounded like the OP was intending to do.
-- Rincewind had always been happy to think of himself as a racist. The One Hundred Meters, the Mile, the Marathon -- he'd run them all.
participants (4)
-
@lbutlr
-
Aki Tuomi
-
Shawn Heisey
-
Voytek Eymont