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.

Restore account dns zone merge entries

Discussion in 'Bind / DNS / Nameserver Issues' started by radeonpower, Jul 11, 2015.

  1. radeonpower

    radeonpower Well-Known Member

    Joined:
    Jul 23, 2009
    Messages:
    129
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hello, ever since I upgraded to 11.50 when restoring an account from another server the old dns data are being inserted to the zone file but commented out like this:

    ; blabla
    ;blabla
    ;blabla
    ;blabla

    Is it possible to turn this off?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Could you elaborate on the type of entries that are commented out? For instance, are they specific type of records? Could you post an example of a zone that does not get transferred over (without using real domain names) in CODE tags?

    Thank you.
     
  3. radeonpower

    radeonpower Well-Known Member

    Joined:
    Jul 23, 2009
    Messages:
    129
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hey, well lets say I transfer account to another server or, import a cpmove backup to another server. The dns zone will then include this:

    Code:
    ; domain.com.    86400    IN    SOA    ns0.domain.com.    my.email.xxx.    ( ; Previous value removed by cPanel transfer auto-merge on 20150719180633 GMT
    ;                         2015071113 ;Serial Number ; Previous value removed by cPanel transfer auto-merge on 20150719180633 GMT
    ;                         43200 ;refresh ; Previous value removed by cPanel transfer auto-merge on 20150719180633 GMT
    ;                         3600 ;retry ; Previous value removed by cPanel transfer auto-merge on 20150719180633 GMT
    ;                         604800 ;expire ; Previous value removed by cPanel transfer auto-merge on 20150719180633 GMT
    ;                         10800 ;minimum ; Previous value removed by cPanel transfer auto-merge on 20150719180633 GMT
    ;     ) ; Previous value removed by cPanel transfer auto-merge on 20150719180633 GMT
    Code:
    ; ftp 3600 IN A x.x.x.x ; Previous value removed by cPanel transfer auto-merge on 20150719180633 GMT
    This never happened before until it started to do it recently.

    I understand this can be handy if you somehow need to know which IP it used to be on, but this makes the zone file kind of messy and I would personally like to disable this.
     
    #3 radeonpower, Jul 23, 2015
    Last edited: Jul 23, 2015
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    This is by design per the following case found in the 11.50 change log:

    Fixed case 148877: Perform DNS record merge on transfer/restore.

    The purpose of this is to easily identify any conflicts after the transfer. It's not currently possible to disable this functionality.

    Thank you.
     
  5. brownsmart

    brownsmart Member

    Joined:
    Jan 9, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    But is it possible to clean this up without manually doing so?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You will need to manually change or remove those entries from the zone, but note the existence of those entries should not cause any problems.

    Thank you.
     
  7. brownsmart

    brownsmart Member

    Joined:
    Jan 9, 2013
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    @radeonpower I found a way to remove the nonsense!!

    First back up your named folder:
    Code:
    cd /var;tar czf named.tgz named
    Then run this to clean up the junk
    Code:
    perl -i.bak -ne 'next if (/^; .+ ; Previous value removed by cPanel transfer auto-merge on/); print;' /var/named/*.db
    You can also adjust the text to remove "cPanel restore auto-merge" by changing it accordingly.
    Code:
    perl -i.bak -ne 'next if (/^; .+ ; Previous value removed by cPanel restore auto-merge on/); print;' /var/named/*.db
    Can't take the credit for this though, got the info from here 512kbps.com/2015/08/07/previous-value-removed-by-cpanel-transfer-auto-merge/ ;)
     
    #7 brownsmart, Oct 27, 2015
    Last edited by a moderator: Jan 15, 2016
  8. mhendiz

    mhendiz Registered

    Joined:
    Jan 14, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Moskov
    cPanel Access Level:
    Root Administrator
    yes used this codes :


    cd /var;tar czf named.tgz named
    Then run this to clean up the junk
    Code:
    perl -i.bak -ne 'next if (/^; .+ ; Previous value removed by cPanel transfer auto-merge on/); print;' /var/named/*.db

    Adsız.png

    only this values are staying. How can delete this?
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You could modify the bash command to reflect the line you want to remove, however those are standard values in any DNS zone created through cPanel, and are useful for troubleshooting. Could you elaborate on why you would like to remove them?

    Thank you.
     
Loading...

Share This Page