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.

How to recover deleted DNS zone?

Discussion in 'Bind / DNS / Nameserver Issues' started by kaito, Nov 18, 2005.

  1. kaito

    kaito Member

    Joined:
    Nov 17, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    While playing with WHM, I made a mistake and
    happened to delete the DNS zone for one of my domains.

    So I tried to "Add a DNS zone" for the deleted domain
    only to get an error message, saying,
    "Sorry, a DNS entry for [the_domain.com] already exists,
    please delete it first".

    Next I also tried "Account Creation" for the deleted domain,
    only to get another error message, saying,
    "Ouch, sorry that username is taken. Check /etc/passwd" and
    "Sorry, a DNS entry for [the_domain.com] already exists,
    please delete it first (from all servers in the dns cluster)".

    So, it appears that the deleted DNS record has not completely
    gone but still stays somewhere in the server.
    But it is never seen in the "List Accounts".

    How can I retrieve it or completely erase it?
    I would very much appreciate for some instruction.
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If it's just the DNS zone you want to recreate, make sure that there's no zone file for the domain in /var/named/ and remove it if it is in there. Also, check /etc/named.conf for an entry for the domain and if it is in there, delete it too.
     
  3. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    If you want to restore the zone file from your Cpanel backup, look in /your_backup_directory/cpbackup/daily/dirs/_var_named.
     
  4. kaito

    kaito Member

    Joined:
    Nov 17, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Where can I find /var/named/ ?

    Dear Chirpy and Stefaans,

    Thank you very much for the trenchant instructions.

    But I cannot figure out where /var/named/ or /your_backup_directory/cpbackup/daily/dirs/_var_named space is located.
    Perhaps, as a reseller, I may not be able to reach that space. Is this right?

    BTW,
    I have been aching for some days, for not being able to find and edit the DNS zone file for my master domain.
    The return message says, "DNS zone for that domain already exists... delete it first."

    So, in this case also, may I remove the zone file for the master domain and start it all over?
    Or is it that a reseller is not allowed to access the zone file of his master domain?
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    As a reseller there's nothing you can do to fix that, you'll have to contact your web hosting provider and have them fix it.
     
  6. kaito

    kaito Member

    Joined:
    Nov 17, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Thank you again, Chirpy.

    Just for my better, clearer, understanding:

    Is it generally true that, for a reseller, access to the DNS zone of the master domain is not available while he can access other DNS zone files of the slave domains?
     
  7. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I'm afraid I don't play much with the reseller features. Your host might be able to better answer your question.
     
  8. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Although the system returned that error, you should have entered the domain name in the field and deleted its DNS zone. Then you could have created the DNS zone again.

    In this case, contact your hosting provider and ask them to clear the named.conf, /etc/passwd, /etc/userdomains, and /etc/shadow from any thing related to that domain.

    Yes, the system failed to remove the entries of the doamin name in question from the system files.

    Good luck!
     
    #8 AndyReed, Nov 20, 2005
    Last edited: Nov 20, 2005
  9. kaito

    kaito Member

    Joined:
    Nov 17, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Dear AndyReed,
    Thank you very much.
    Your step-by-step comment helps me look these things
    more clearly and with more confidence. ;)
     
  10. guilliam

    guilliam Member

    Joined:
    Feb 9, 2006
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sunny City Cebu, Philippines!
    im having the same issue..

    i dont know where to enter the SSH via the main account.. i still have to enter the created account to access the ssh.

    1. where and how from the WHM can i enter the ssh/shell console?

    - g
     
  11. mctDarren

    mctDarren Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    664
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    New Jersey
    cPanel Access Level:
    Root Administrator
    Do you mean from the main WHM account or from a reseller account? I don't believe you can SSH in from the main WHM account. Unless of course, you are using an SSH client outside of WHM...
     
  12. guilliam

    guilliam Member

    Joined:
    Feb 9, 2006
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sunny City Cebu, Philippines!

    okay got that noted. thats exactly my question.. i thought others has a "button" right on their WHM's in which i cant find on the servers im administering. ehheeh.

    so really have to login to an account to use the openSSH or use an external ssh right? sorry to RECONFIRM. :)

    - g
     
Loading...

Share This Page