Migrating to new main server on a different network

baroninn

Active Member
Jan 31, 2018
25
2
3
Iceland
cPanel Access Level
Root Administrator
I have 5 cPanel servers
1x main web,mail,sql,etc...
4x dnsonly for nameservers
my main webserver is in a dns cluster setup with BIND and write-only role.
DNS Path Diagram:
cpanel-main.exampledomain.com
-> ns1.exampledomain.com
-> ns2.exampledomain.com
-> ns3.exampledomain.com
-> ns4.exampledomain.com
....... so to be clear... my main is only writing to ns1 .... and then the ns1 will sync to ns2,ns3,ns4

I'm getting ready to migrate all accounts to a new CP server/new public ip network.... although it will be on the same hardware(hyper-v host, with dual NIC, dual WAN, dual vm's).
The old server is behind a very slow vdsl connection and it is behind NAT.
the new is not behind NAT.

I have manually configured the new cPanel server with cloudlinux8, and I think its ready... and i'm really excited to begin the migration process ;-)

so.... my main concerns are my nameservers and the DNS cluster setup.

I want to keep using my nameservers/dns-cluster on my new webserver, because I have soooo many records.
I will not be migrating ALL accounts at once.... just few accounts every day to be safe.

so how should I go about this,,, so that my new cPanel will be on the same dns cluster without overwriting the old dns records except the ones I migrate day-to-day ?
can I just connect my new server as write-only to the same dns-cluster with same settings as my old-main ? and that would automate the migration process of relative dns records and leave others alone ? that would be awesome, but i'm unsure.
or will it clear my dns-cluster of all records ;-) which would be terrible...

thanks
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
5,316
683
313
cPanel Access Level
Root Administrator
Hey there! I set up a test cluster where the Destination server was already attached to the cluster and the transfer worked just fine. I would recommend trying the following on your setup as a test before moving forward with the transfer of your batches of accounts:
  • Create a new cPanel on the Source account with no content. The domain name can be fake, since we're just using it for testing
  • Ensure the zone file has propagated to the cluster memebers.
  • Ensure the new Destination machine has already been connected to the cluster.
  • Transfer the test domain to the Destination
  • Check the zone file on the clustered nameservers to see how the DNS zone was handled.
If it worked like my testing did, it should handle that properly.
 

baroninn

Active Member
Jan 31, 2018
25
2
3
Iceland
cPanel Access Level
Root Administrator
I was just about to do this now.... but in the configuration page I see a warning that does not make me happy :)
"Write-only: This server will write changes to the remote server. Changes to the remote server will not propagate back to this server. Warning: Two Write-only servers that attempt to write changes to a matching record on the same remote server will cause a conflict and may corrupt data. "

so yeah,, i'm about to add the second write-only webserver to the dns-cluster as described in my first question. But this warning says that this will cause a conflict and may corrupt data...
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
5,316
683
313
cPanel Access Level
Root Administrator
In general, the webservers would have the DNSOnly system set to synchronize, and the DNSOnly servers should have their reverse relationship as 'standalone'

Webservers are then able to write to the DNSOnly machines, and this makes sure that DNSOnly does not write anything to the individual web servers.

Does that help to clear things up?
 

baroninn

Active Member
Jan 31, 2018
25
2
3
Iceland
cPanel Access Level
Root Administrator
this does help clear a little.
but also raises more questions ;-) haha.
but I think its almost clear what I have to do... this will probably be my last comment ;-)
thanks for taking the time to answer ;-)

please see attached files.... these are screenshot from my old-webserver and screenshot from my ns1 server.
no configurations have been made on the ns2 , ns3 or ns4 except api tokens....... so no screenshots needed.

are you saying I need to change from write-only to syncronize on my old-webserver.domain.tld ?
and then connect my new-webserver.domain.tld to ns1.domain.tld also as synchronize ?

if your answer is yes, I have a follow up question: will anything happen if I change from write-only to synchronize.

123.png

and screenshot from my ns1.domain.tld :
456.png
 

baroninn

Active Member
Jan 31, 2018
25
2
3
Iceland
cPanel Access Level
Root Administrator
thanks buddy.
I will make the change on the old-webserver,,,,
connect new-webserver as synchronize changes to ns servers (without reverse trust) ...
make some tests with migration...
aaaaand..
i'll post my happy smiles.
thanks.
 

baroninn

Active Member
Jan 31, 2018
25
2
3
Iceland
cPanel Access Level
Root Administrator
!! success !!
love it...
I migrated a site from old-server to new-server. and everything was lovely....
smiley faces as promised = ":);):cool::-D:-p:)"

only one unexpected thing happened which I didn't think would happen....:: All zones were synced to new-webserver.
but I set it so that it would not... maybe this is normal behavior.
-on all DNSOnly servers I configured both my webservers to be "Standalone ".
-on both Webservers I configured my DNSOnly servers to be "Synchronize Changes"

I enabled reverse trust.... maybe this is the reason all zones were synced..... I placed my new API keys on my DNSOnly servers and ticked the "enable reverse trust"..... maybe I should have done it the other way around.

but hey.. maybe this is better.... I was actually starting to wonder "what about all the zones that are not on any accounts,,,, just standalone zones pointing to external services".... well this solves all of that...

@cPRex , I hope you have a wonderful day !
thank you !
 

baroninn

Active Member
Jan 31, 2018
25
2
3
Iceland
cPanel Access Level
Root Administrator
I only migrated 1 account... and all packages... nothing more.
all zones are now inside new server... even the zones that do not belong to any accounts... I did not migrate that.

so yes... this is what im seeing happening... all zones migrated to new server.. but I only selected 1 account.
 

baroninn

Active Member
Jan 31, 2018
25
2
3
Iceland
cPanel Access Level
Root Administrator
here are screenshots from my current configuration:

both webservers have this configuration:
1614709453684.png

and all DNSOnly servers have this configuration:
1614709554307.png

well... the only difference from ns1, ns2, ns3 and ns4 is the DNS Path Diagram....
on ns1 I only see ns1.domain.tld in DNS Path Diagram
on ns2 I only see ns2.domain.tld in DNS Path Diagram
on ns3 I only see ns3.domain.tld in DNS Path Diagram
on ns4 I only see ns4.domain.tld in DNS Path Diagram
this is probably normal behavior