Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Member
    Join Date
    Nov 2005
    Posts
    6

    Default How to recover deleted DNS zone?

    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. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    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.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    Member Stefaans's Avatar
    Join Date
    Mar 2002
    Location
    Vancouver, Canada
    Posts
    445

    Default

    If you want to restore the zone file from your Cpanel backup, look in /your_backup_directory/cpbackup/daily/dirs/_var_named.

  4. #4
    Member
    Join Date
    Nov 2005
    Posts
    6

    Default 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. #5
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    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.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  6. #6
    Member
    Join Date
    Nov 2005
    Posts
    6

    Default

    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. #7
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    I'm afraid I don't play much with the reseller features. Your host might be able to better answer your question.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  8. #8
    cPanel Partner NOC cPanel Partner NOC Badge AndyReed's Avatar
    Join Date
    May 2004
    Location
    Minneapolis, MN
    Posts
    2,223

    Default

    Quote Originally Posted by kaito
    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".
    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.

    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)".
    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.

    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".
    Yes, the system failed to remove the entries of the doamin name in question from the system files.

    Good luck!
    Last edited by AndyReed; 11-20-2005 at 08:47 PM.
    Andy Reed
    RHCE and CCNA
    ServerTune.com

  9. #9
    Member
    Join Date
    Nov 2005
    Posts
    6

    Default

    Dear AndyReed,
    Thank you very much.
    Your step-by-step comment helps me look these things
    more clearly and with more confidence.

  10. #10
    Member guilliam's Avatar
    Join Date
    Feb 2006
    Location
    Sunny City Cebu, Philippines!
    Posts
    22

    Default

    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. #11
    Member serversphere's Avatar
    Join Date
    Jan 2004
    Posts
    658

    Default

    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. #12
    Member guilliam's Avatar
    Join Date
    Feb 2006
    Location
    Sunny City Cebu, Philippines!
    Posts
    22

    Default

    Quote Originally Posted by webtiva
    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...

    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

Similar Threads & Tags
Similar threads

  1. Deleted hostname dns zone
    By GreatGator in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 05-19-2010, 12:51 AM
  2. How to recover a deleted account
    By paulg in forum Data Protection
    Replies: 4
    Last Post: 09-10-2009, 04:33 PM
  3. Deleted DNS Zone... Help.. how do I fix it..
    By hostserve in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 09-04-2007, 01:53 AM
  4. Deleted account - dns zone recreation problem
    By daystorm in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-09-2007, 10:36 PM
  5. Deleted Database - Any way to recover?
    By neenach2002 in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 11-23-2005, 08:59 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube