Changed server IP but DNS zones remain intact

Hello
I moved my cPanel server and it has a new IP. I used the IP migration wizard and all accounts are listed with the new IP, but when I check the DNS zones, they still have the old one.

Is there an option in the GUI to replace the old IP? I did not remember I have to do this manually before. Anything changed these days?

Just in case someone else needs this:

  1. Create a backup cp -a /var/named /var/named.backup

  2. Change into your zone folder cd /var/named

  3. Replace the IPs: perl -pi.bak -e "s/[oldip]/[newip]/g" *.db

  4. Update SOA record find /var/named/*.db -mtime -1 -exec perl -pi -e 'if (/^\s+(\d{10})\s+;\s+serial/i) { my $i = $1+1; s/$1/$i/;}' '{}' \;

  5. Make sure all the IPs changed on the zones and remove the .bak files and /var/named.backup directory.

3 Likes