Migrating to new main server on a different network
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
-
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.
0 -
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... 0 -
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? 0 -
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. and screenshot from my ns1.domain.tld : 0 -
In general, we want to see the following: On the DNSOnly server we should see this data next to each webserver: And e should see the following on the Web server: 0 -
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. 0 -
That sounds good! 0 -
!! 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 ! 0 -
I would expect all the zones to get moved from the domains that you migrated, but not *all* the zones in the DNSOnly system. Is that what you were seeing happen? 0 -
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. 0 -
So that is something I would not expect to happen. If you'd like to have our team check your configuration and confirm the settings you're always welcome to open a ticket with us :D 0 -
oki.. now im a little scared. I created a test account on my old webserver. the dns zone for this test account was replicated over to the new server. 0 -
here are screenshots from my current configuration: both webservers have this configuration: and all DNSOnly servers have this configuration: 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 0 -
any change is replicated to any. I made tests on both webservers..... and everything is replicated on the other server. 0 -
Can you open a ticket for that? Your screenshots look correct to me, so I'm not sure how the zone would get from server A to server B with the setup you have described. 0 -
yup.. no problemo. will do that now 0 -
Great - if you could post the ticket number here that will let me follow along and keep this thread updated as well. 0 -
done. love the support creating experience... ticket id: #94295985 I included a url to this thread in the support ticket. 0 -
Thanks so much! 0 -
ok, just gonna update this forum thread after a session with technical support yesterday. Technical support answer: "Are you checking WHM -> Edit DNS Zone for the changes and zone additions? If so, the reported behavior is normal because webserver1 and webserver2 share the same DNS cluster members and they are set to Synchronize Changes with the DNS Cluster. Zone data is read from the DNS cluster in Edit DNS Zone with this configuration, and because webserver1 and webserver2 share the same cluster members they should always see the same DNS zones and zone data. " ok... to clarify and sum it up: the zones were actually NOT replicated over to the new webserver like I experienced in the GUI. instead all webservers read all zones and zone data from the DNSOnly cluster when selecting the ("Synchronize Changes") mode. if we use Terminal shell there are no zone records on the new webserver except the one I migrated... and no changes are synced from webserver1 to webserver2..... the changes are only synced to the DNSOnly cluster. but the GUI (Graphical user interface) shows all zones and zone data from the DNSOnly cluster. (a little bit confusing, but actually makes sense). so this is normal behavior in cPanel DNSOnly cluster based on our configuration = ("Synchronize Changes"). all webservers can read all zones if we select "Synchronize Changes"..... and we can only view the zones and records in the GUI. he also said that if I change to "write-only" then this behavior will not happen... then the Webservers will not read zone data from the cluster.... they will just write to the cluster, and read from local db. ..... would be great to include this memo in the configuration page..... I was actually thinking "what is the difference from Synchronize changes and Write-only ?" ..... and .... "Why does cPRex want me to change it from Write-only to Sync changes,,,, it looks the same". so there you have it ! from my understanding: Write-only and Synchronize Changes does the same,,,, except Write-only will not read from the Cluster. so now I just have to figure out the best method to transfer all zones from old-webserver over to new-webserver... maybe just open them all up and click save ;-) i donno ;-) would be great if we can get one more setting in the transfer tool = "Transfer zones" ;-) I guess I will have to compare old with new in terminal window, to see what zones are missing in new webserver. i'll post my methods here when I have finished the migration. 0 -
Thanks for posting that!! 0 -
hmm.. I'm seeing some strange error message when using the "Transfer Tool" from old to new... maybe you can clear it up for me. This system is not authoritative for the zone "customer-domain.tld". is this message saying that the local webserver is not authorotative, and the authorotative is the DNSOnly cluster server ? if yes, then im happy ;-) 0 -
That's correct - it's letting you know the local machine doesn't control the DNS records as it would be up to the cluster. 0 -
success !! :-" migration complete from old-webserver ->> new-webserver everything went smoothly, no customer complains,,, I don't even think they noticed. well... only one account remains that is hosting a old laravel project .. it does not work with the new mysql setup on the new webserver. o.k. to sum it up: pre-migration steps on old server: - backup !
- backup !!!
- additionally backup (/var/named/*.*) to your computer,,, you might need to view these later after migrating.
- create a test-account
- make sure that I use the same "Nameserver selection" setting on all servers.... also the new... in my case I used BIND on my old server, so I configured the new server to also BIND.
- connect new-webserver to DNSOnly cluster and make sure that webserver are synchronizing changes to DNSOnly and DNSOnly will not sync to web-servers by selecting standalone.
- install all necessary easyapache4 packages,extensions,etc... ( I just compared with the old server manually ) few minutes work.
- configure php ( maxmemory etc... also compared that with old server manually )
- set TTL to 900 seconds for A records and MX records... on ALL domains ;-) and wait for 2 days before starting the migration.... some routers and servers take longer to update their tables... so its a good rule to wait at minimum 48hours.
- noted which domains are NOT using my DNSOnly cluster.... additional steps required for those domains pre/post migration like notify customer.
- verify email deliverability
- Transfer test-account from old-server and verify DNS transfer in /var/named and also check if DNSOnly cluster has migrated matching records to new server.......... also test email on the test-account.
- Accounts that were over 2gb in size I used command line (/scripts/pkgacct accountname) to create a cpmove tar file.
- only reason for this is because old webserver was on a xDSL 30MB connection... so this was much faster....
- Accounts that were under 2gb I used the built in transfer tool.
- I had domain zones that were not associated with any account, so to transfer those over I copied all zone files from old-webserver over to new-webserver (/var/named/domain-name.tld.db)
- just remember to verify file-permissions(600) and owner needs to be "named:named" after the copy process.
- and then I ran this command line (/scripts/rebuilddnsconfig) on the new server.
- disconnect old-webserver from DNSOnly cluster.
- changed TTL on all the A records and MX records back to 3600 or 14400.
- World domination with Chuck Norris by my side !
0 -
I'm glad you had such a great experience! Can you let me know more about the world domination step???? :D 0
Please sign in to leave a comment.
Comments
25 comments