The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Manual MyDNS Changes

Discussion in 'cPanel Developers' started by Rinzler78, Sep 25, 2013.

  1. Rinzler78

    Rinzler78 Member

    Joined:
    May 12, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi all,

    Is there any functionality to edit DNS zone info via command line or hooks? Im currently writing a script that will just edit the database directly however this isnt reflected when opening the DNS zone in the Edit DNS Zone console in WHM.

    If I run an nslookup to localhost the change has taken effect so MyDNS is using the new change as expected but the gui still reports old data. Maybe the gui is reading its DNS data from my other DNS node in the cluster as opposed to localhost?

    I then run a dns cluster sync from this server outwards specifically for the domain i changed and the database changes revert back to what they were before, this is potentially a different issue with my dns clustering config as i could only ever get it to work in synch changes mode when setting up for some reason.

    The change i made was a www cname destination.

    Any advice on the best way to tackle this would be great as im at a bit of a loss at the moment!

    Cheers!
     
  2. Rinzler78

    Rinzler78 Member

    Joined:
    May 12, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi,

    What is the best way to go about changing MyDns records using a script? Im trying to write something here but encountering a few problems. I see the there are varbinary fields being used and it also seems to create a new record when amending zones instead of amending the existing record? Then it deletes the old record when a cluster sync occurs, creating a new zoneID.

    Are there any tools out there I can use or is this the only way? Any help appreciated!

    Cheers

    Sam
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  4. Rinzler78

    Rinzler78 Member

    Joined:
    May 12, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    :) Thanks Michael.
     
  5. Rinzler78

    Rinzler78 Member

    Joined:
    May 12, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I've been trying to replicate the steps taken when editing a cname record in whm to no avail so far:

    Recreate SOA record -> insert new rr using new zone id from new soa on both nodes -> sync clusters

    but it just deletes my record and updates the existing one to use the new zone id.

    There must be a way to do this? The only alternative i can see is to use non whm mydns and mysql replication with hooks into cpanel :-/
     
  6. Rinzler78

    Rinzler78 Member

    Joined:
    May 12, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Raised a ticket and found this can be done via the API:

    XML and JSON APIs

    Closed!
     

Share This Page