cPanel transfer tool wipes custom A records?

stormy

Well-Known Member
Nov 22, 2003
163
14
168
Spain
cPanel Access Level
Root Administrator
We have just done a big server migration using the cPanel transfer tool, and we find that all custom A records for any accounts have been wiped and pointed to the new server's IP address. That includes custom entries for "www" as well as totally custom A records pointing to other hostnames.

Is this normal? Or was there a mistake somewhere?
 

Eminds

Well-Known Member
Nov 10, 2016
319
32
28
India
cPanel Access Level
Root Administrator
You must have selected the option of assign new IP addresses while initiating the migration from cpanel and that has changed the IP addresses for all the website accounts. Regarding the custom A records you can always edit them as per your requirements from Edit DNS option in WHM.
 

stormy

Well-Known Member
Nov 22, 2003
163
14
168
Spain
cPanel Access Level
Root Administrator
Let me get this straight: I'm using the transfer tool, and checking "Express Transfer". Does this wipe any custom A records, and point everything to the IP of the new server, regardless whether the entries match the old IP or not?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello @stormy,

The Transfer Tool updates DNS records that reference the old IP address to use the account's new IP address. Thus, if the account is assigned an IP address of "1.2.3.4" on the source server, then the DNS zone created on the destination server during the transfer process will automatically replace DNS entries referencing "1.2.3.4" with the IP address assigned to the account on the destination server. If there's an "A" record in the zone on the source server that points to another IP address, say "5.6.7.8", then that IP address is preserved in the DNS zone created on the destination server.

I believe the behavior you are reporting is related to an existing bug (CPANEL-5579), where the "Express Transfer" option changes all IP Addresses in the source server's zone file to match the destination server IP address, even if it's not an IP address that's used on the source server. There's no time frame to report on a resolution, however I'll update this thread with more information on the status of this case as it becomes available.

Thank you.
 

stormy

Well-Known Member
Nov 22, 2003
163
14
168
Spain
cPanel Access Level
Root Administrator
I believe the behavior you are reporting is related to an existing bug (CPANEL-5579), where the "Express Transfer" option changes all IP Addresses in the source server's zone file to match the destination server IP address, even if it's not an IP address that's used on the source server. There's no time frame to report on a resolution, however I'll update this thread with more information on the status of this case as it becomes available.
This bug has bit me hard, yes. I lost custom A records for tens of accounts. And I still have to migrate more than a thousand accounts.

Is there a workaround? I hope there is one!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello @stormy,

It's advised to avoid using the "Express Transfer" option to avoid this issue on additional accounts until a resolution is published.
Do you have backups enabled on the accounts? If so, you can extract the DNS zones with commands such as:

Code:
cd /path/to/backups
tar -zxvf username.tar.gz username/dnszones/*
Thank you.
 

stormy

Well-Known Member
Nov 22, 2003
163
14
168
Spain
cPanel Access Level
Root Administrator
Thanks @cPanelMichael. However, if I don't use the express transfer, the transfer is a lot more complicated, with mail and sites still running in the old server.

If I don't use express transfer, do the regular A records still get changed? All my servers run in a DNS cluster, by the way.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello,

With Express Transfer disabled, the behavior referenced earlier is correctly followed:

The Transfer Tool updates DNS records that reference the old IP address to use the account's new IP address. Thus, if the account is assigned an IP address of "1.2.3.4" on the source server, then the DNS zone created on the destination server during the transfer process will automatically replace DNS entries referencing "1.2.3.4" with the IP address assigned to the account on the destination server. If there's an "A" record in the zone on the source server that points to another IP address, say "5.6.7.8", then that IP address is preserved in the DNS zone created on the destination server.
Thank you.
 

stormy

Well-Known Member
Nov 22, 2003
163
14
168
Spain
cPanel Access Level
Root Administrator
Thanks! So we only lose the automatic account suspensions and the mail forwarding to the new server. Is there a manual way of attaining this? Suspending is easy :), the mail part is the one I'm most interested in.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
New Thanks! So we only lose the automatic account suspensions and the mail forwarding to the new server. Is there a manual way of attaining this? Suspending is easy :), the mail part is the one I'm most interested in.
You can update the MX entries in the DNS zone to a hostname that resolves to the IP address of the destination server, and choose "Remote Mail Exchanger" under "Email Routing" in the "WHM >> Edit DNS Zone" interface. In addition, you'd want to change the "A" records for "mail" and "webmail" to the destination server's IP address.

Thank you.
 

stormy

Well-Known Member
Nov 22, 2003
163
14
168
Spain
cPanel Access Level
Root Administrator
Thanks @cPanelMichael . I'm looking for a solution that I can apply to 500+ accounts, so I don't think I can do that.

I know you don't give any dates for bug fixes, but can you give me a hint? Are we talking days, weeks or months?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
I know you don't give any dates for bug fixes, but can you give me a hint? Are we talking days, weeks or months?
I don't have a time frame to report at this time, but I have linked this thread to the internal case. I'll update this thread as soon as new information is available.

Thank you.
 

serversaurus

Registered
Sep 5, 2020
3
0
1
Melbourne, Australia
cPanel Access Level
Root Administrator
Confirming we've also just experienced the issue with custom DNS records pointing to external IP address being overwritten to the local server IP address when migrating an account using the Transfer Tool, but NOT using Live Transfer or Express functions, source server running v98.0.5 to destination host v98.0.6.

Strangely enough the issue occured for only one of the multiple domains within the account, however the software did also create a bunch of mail.domain.com A records in the destination zones which weren't existing in the source DNS zones.
 

serversaurus

Registered
Sep 5, 2020
3
0
1
Melbourne, Australia
cPanel Access Level
Root Administrator
@serversaurus - hey there, from one dino to another!

Just to confirm, are you saying you moved a bunch of sites over, but only one domain experienced the problem with the custom A records?
Hey cPRex! No- We migrated a cPanel account which hosts multiple addon domains. There an Addon domain within the account which had the same DNS setup as the primary domain (ie. both had an internally hosted website with external mail provider which relied on the use of the mail.subdomain.com A record). The migration didn't update the addon domains mail.subdomain.com A record, however the primary domains mail.subdomain.com A record was updated to use the internal server IP address despite the fact the IP address was formerly pointing to a custom A record entry. I've kept a backup of the account before the migration in case it would be worth investigating the interaction further.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,418
1,000
313
cPanel Access Level
Root Administrator
Thanks for the additional details. I believe that is the intended behavior when performing a migration - any of the standard DNS entries that get included/created by default will get the IP address updated. You can see a list of these if you check the zone template in WHM >> Edit Zone Templates and checking out the standardvirtualftp template.
 

serversaurus

Registered
Sep 5, 2020
3
0
1
Melbourne, Australia
cPanel Access Level
Root Administrator
Thanks for the additional details. I believe that is the intended behavior when performing a migration - any of the standard DNS entries that get included/created by default will get the IP address updated. You can see a list of these if you check the zone template in WHM >> Edit Zone Templates and checking out the standardvirtualftp template.
Hi cPRex, thanks for your notes. Shouldn't cPanel only update DNS records with the destination server IP **if** the IP address is the IP of the source server? rather than just updating all IP addresses within the DNS zone? ...if your comments are correct, this would suggest the cPanel DNS Zone Manager does not support the use of external DNS configurations..
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,418
1,000
313
cPanel Access Level
Root Administrator
In my test environment I did the following:

-Created an account on the Source machine
-added the following DNS record: randomtestrecord IN A 1.2.3.4
-migrated the account to the Destination machine

At this point I confirmed the 1.2.3.4 IP address was still there, and it would make sense we would keep those.

For the second test, I created an addon domain in cPanel for the account I plan to transfer and gave that a custom IP. I also changed the mail.domain.com IP for the main domain to point to 1.2.3.4. After the transfer to the Destination completed I confirmed:

-mail.domain.com of the main domain was still pointed to the external IP address
-the addon domain was also pointed to the custom address

At this point I'm not able to reproduce the issue you're seeing, but if you have a way we can reproduce this on one of your systems you're welcome to create a ticket so our team can check it out.