Results 1 to 6 of 6

Thread: Import/Convert BIND zone file to cPanel/WHM server

  1. #1
    Member
    Join Date
    May 2007
    Posts
    12

    Default Import/Convert BIND zone file to cPanel/WHM server

    We have a ton of domains we're trying to take control over from GoDaddy (about time, I know). All of the DNS settings for each domain name exports to a bind-compatible zone file, but in all my searching, I haven't found any creative solutions for either:

    1) Convert from BIND format to cPanel's format (so I can mostly copy/paste into added domains)

    2) Import via some script to convert and insert the records on the fly

    I'm open to any options, but copy/paste for every zone file for every domain doesn't seem like the most productive route to take. Your responses are valued.
    Last edited by ashworth102680; 01-13-2012 at 10:09 PM.

  2. #2
    Member
    Join Date
    May 2007
    Posts
    12

    Default Re: Import/Convert BIND zone file to cPanel/WHM server

    Nobody's come across this before? Getting zone files converted from BIND to cPanel so we don't need to manually data enter all the zones/records? This seems like it would be something affecting most of us if migrating large quantities of websites from another hosting vendor.

  3. #3
    cPanel Staff cPanelKenSmith's Avatar
    Join Date
    Aug 2010
    Posts
    3

    Default Re: Import/Convert BIND zone file to cPanel/WHM server

    The zone format used by cPanel servers is BIND compatible because the default DNS server in use is BIND. You can also choose to use NSD, however that loads BIND zone files as well.

    You can see the zones currently on the machine by looking in /var/named/*.db. You'll find them all to be standard BIND zone files.
    cPResources:

    -- cPanelKenSmith - Kenneth Smith, Technical Analyst II / Migrations Specialist, cPanel Technical Support

  4. #4
    Member
    Join Date
    May 2007
    Posts
    12

    Default Re: Import/Convert BIND zone file to cPanel/WHM server

    Okay, so I was thrown off a bit when I looked at the zone files that cPanel created vs. the BIND zone files that I have. They are noticeably different in structure. Maybe cPanel doesn't care, and will automatically detect and fix it?

    chirpy's post below suggests to me that there's more to it than we may be talking about here.

    Import BIND into DNS-ONLY
    Last edited by ashworth102680; 01-24-2012 at 10:28 AM.

  5. #5
    cPanel Staff cPanelKenSmith's Avatar
    Join Date
    Aug 2010
    Posts
    3

    Default Re: Import/Convert BIND zone file to cPanel/WHM server

    Quote Originally Posted by ashworth102680 View Post
    Okay, so I was thrown off a bit when I looked at the zone files that cPanel created vs. the BIND zone files that I have. They are noticeably different in structure. Maybe cPanel doesn't care, and will automatically detect and fix it?

    chirpy's post below suggests to me that there's more to it than we may be talking about here.

    Import BIND into DNS-ONLY
    The zones themselves are bind zones that bind is happy to load and use. Our UI does put some extra comments into the zone files that wouldn't be there normally, but that's because our UI is what's writing and reading them.

    As a test, you could simply copy a couple ones over to a test cpanel machine to the /var/named directory and then go to the "edit dns zone" tool within WHM. If the zones show up okay in the UI you're all set.

    If not, then you may need to modify a few things as Chirpy points out. Also take note that the thread you point out is over 5 years old now. The code involved has changed quite a bit since then.
    cPResources:

    -- cPanelKenSmith - Kenneth Smith, Technical Analyst II / Migrations Specialist, cPanel Technical Support

  6. #6
    cPanel Staff cPanelKeithS's Avatar
    Join Date
    Oct 2008
    Posts
    26

    Default Re: Import/Convert BIND zone file to cPanel/WHM server

    I have noticed in the past that the Edit DNS Zone section of WHM does look for comments in the zone file that lets it know the zones were created by cPanel & WHM. This is an example from one of the zones on my server.

    ; cPanel first:11.30.0.32 (update_time):1328727535 Cpanel::ZoneFile::VERSION:1.3 hostname:vps.cpks.info latest:11.30.5.6
    ; Zone file for keithacct2.test

    If you replicate those comments, and have a properly BIND formatted zone file, cPanel & WHM should populate properly.
    cPResources:

    -- cPanelKeithS - Keith Stewart, Migration Specialist, Technical Analyst, cPanel Technical Support

Similar Threads

  1. Replies: 3
    Last Post: 05-30-2011, 02:08 AM
  2. convert cPanel/WHM version
    By crazyaboutlinux in forum New User Questions
    Replies: 4
    Last Post: 05-28-2009, 09:09 AM
  3. Error from domain wrapper: Bind reloading on server using rndc zone
    By bnn121 in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 07-10-2007, 10:32 AM
  4. Replies: 1
    Last Post: 05-10-2006, 10:12 PM
  5. Import BIND into DNS-ONLY
    By Ferdinant in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 12-21-2005, 10:26 AM