wonder_wonder

Well-Known Member
Jan 16, 2019
108
40
28
Spain
cPanel Access Level
Root Administrator
Hello.
In the next few days (around 10-15 days) I will perform a server migration.
The process is clear to me, I have done it before.
But with this client I have a "but" or "difficulty" that I have not had before and I do not know how to deal with it.
In the time it takes to spread the dns, you may receive an email, because of the importance of it, you should do it in some way that these emails that can receive in the time it takes the dns to change / spread, not lose
Is it possible to carry out some process or script so that, during this time of propagation of dns, the possible emails that can receive are not lost?
I have searched for information about it, in some sites I have read about synchronization script (I do not have knowledge for it) and in other sites I have read, just at the time of making backup of the old server, change the dns in old server so that point to the new one There is no problem in that, if they receive an email, it is sent back to the sender with an error (that way, the sender will send it again) or leave the server off for a few hours while the DNS is propagated (in this way, the same thing would happen, sender would receive error mail and would send it again), anything except that sender sends, do not receive error email, think has arrived and my client does not receive it.
Thanks in advance :)
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,774
328
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
Right after the dns change is made, its possible some emails may still get delivered to the originating server.

What your client can do is use webmail using the old server's IP address to retreive any emails that may have still gone to the old server after the transfer is made.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello @wonder_wonder,

You could use the imapsync utility to synchronize emails from the source server to the destination server after the DNS change propagates. Here's a user-submitted guide on using this utility:

HOW TO: Using IMAPSync to Transfer mail from server to server

Additionally, check out the "Minimize Your Downtime" tab on this document to see the additional steps you can take to reduce the downtime when the DNS is updated.

Thank you.
 
  • Like
Reactions: wonder_wonder

wonder_wonder

Well-Known Member
Jan 16, 2019
108
40
28
Spain
cPanel Access Level
Root Administrator
Hi!
Right after the dns change is made, its possible some emails may still get delivered to the originating server.

What your client can do is use webmail using the old server's IP address to retreive any emails that may have still gone to the old server after the transfer is made.
It's an option I had not thought of but ... I prefer to leave it as a last option. This client ... the fewer things I have to tell him to do, the better he does :)
If I tell you that some mails can be on one server and others on the new one ... I prefer to stop the service and restore it when the migration is complete :)

Hello @wonder_wonder,

You could use the imapsync utility to synchronize emails from the source server to the destination server after the DNS change propagates. Here's a user-submitted guide on using this utility:

HOW TO: Using IMAPSync to Transfer mail from server to server
Hi @cPanelMichael !
This is a very good option, but from what I have read, it transfers from one server to another.
Is it possible to "synchronize"?
I know that the possibility of synchronization (adding the ones received in the old server to the new one) exists, but I have not been able to find how to do this ...

Additionally, check out the "Minimize Your Downtime" tab on this document to see the additional steps you can take to reduce the downtime when the DNS is updated.

Thank you.
Thanks, perfect document for view how accelerate the migration process :)
I was also thinking about, in the old server, changing the dns so that they point to the new one just at the time of migration.
Although during the hours that it takes to do the migration (finish backup, upload it to the new one and reestablish, which I calculate will be about 4 or 6 hours) there I run the risk of receiving mail in the old one that does not reach the new one.
The change of time in TTL is important during this process.

As always thank you very much!
 
  • Like
Reactions: cPanelMichael

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
This is a very good option, but from what I have read, it transfers from one server to another.
Is it possible to "synchronize"?
I know that the possibility of synchronization (adding the ones received in the old server to the new one) exists, but I have not been able to find how to do this ...
Here's a quote from the linked imapsync thread that answers this question:

NOTE: You can keep running this script over and over. It will skip messages that already exist on the new server. So, you can copy once, then change MX/DNS, then run it again later, to catch any messages that came in after the first run.
Thank you.
 
  • Like
Reactions: wonder_wonder

wonder_wonder

Well-Known Member
Jan 16, 2019
108
40
28
Spain
cPanel Access Level
Root Administrator
Hello @cPanelMichael !
Ups, either I read it very fast, or I skipped it or ... as it was already too late at night for me, I did not notice or I saw it exactly ...
Indeed, that was my question and it is explained in the link, that is precisely what I want to do.
Again, thank you very much!
 
  • Like
Reactions: cPanelMichael