Migrating to new main server on a different network

baroninn

Active Member
Jan 31, 2018
25
2
3
Iceland
cPanel Access Level
Root Administrator
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.
 

baroninn

Active Member
Jan 31, 2018
25
2
3
Iceland
cPanel Access Level
Root Administrator
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 ;-)
 

baroninn

Active Member
Jan 31, 2018
25
2
3
Iceland
cPanel Access Level
Root Administrator
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:
  1. backup !
  2. backup !!!
  3. additionally backup (/var/named/*.*) to your computer,,, you might need to view these later after migrating.
  4. create a test-account
pre-migration steps on new server:
  1. 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.
  2. 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.
  3. install all necessary easyapache4 packages,extensions,etc... ( I just compared with the old server manually ) few minutes work.
  4. configure php ( maxmemory etc... also compared that with old server manually )
  5. 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.
  6. noted which domains are NOT using my DNSOnly cluster.... additional steps required for those domains pre/post migration like notify customer.
  7. verify email deliverability
  8. 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.
Migration steps:
this is actually the easiest and most simple task of them all.
I did stretch the migration over a 7day period.... just to be safe and also did some additional verifications on some accounts since this was my first ;-)
  1. Accounts that were over 2gb in size I used command line (/scripts/pkgacct accountname) to create a cpmove tar file.
    1. only reason for this is because old webserver was on a xDSL 30MB connection... so this was much faster....
  2. Accounts that were under 2gb I used the built in transfer tool.
I did get one account that failed to restore everything.... so the solution to that was to run the Transfer again without the "Restricted Restore" and then enabled the "Overwrite existing".... everything worked out smoothly ;-)

post-migration steps:
  1. 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)
    1. just remember to verify file-permissions(600) and owner needs to be "named:named" after the copy process.
    2. and then I ran this command line (/scripts/rebuilddnsconfig) on the new server.
  2. disconnect old-webserver from DNSOnly cluster.
  3. changed TTL on all the A records and MX records back to 3600 or 14400.
  4. World domination with Chuck Norris by my side !

hope this forum thread helps someone .... it did help me ;-)