Migrating DNS

Discussion in 'Installation/Configuration' started by jmroth, Oct 14, 2006.

  1. jmroth

    jmroth New Member

    Hi there,
    I have moved from one server to a new one, of course ISPConfig is moving with me :)
    Now, the only thing still in use on the old machine is Bind, i.e. DNS.
    My question: how do I migrate ISPConfig's DNS information, which has changed on the old server since it was all moved to the new one.
    I guess a good start would be to copy over the current dns_* tables to the new host. However:
    1. There are old entries that have since be deleted. Just moving a smaller table over a larger one will probably not work . (Since I cannot set the 'd' entries in the status field)
    2. There are tables like dns_mx which do not have a 'status' field. What about them?
    Regards,
    Marc
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    1) Make a abckup of the mysql database on your new server.
    2) Replace all tables that begin with dns_ in the name on you new server with tha latest tables on your old server. If you do this with a sql dump of the tables, you can easily replace all old IP addresses with the new IP addresses with the replace function of a text editor. But you may do this in phpmyadmin as well if you prefer it this way.
    3) now set the stauts field to 'n' in the table dns_isp_dns, and then change one DNS record in the ISPConfig interface. ISPConfig will then start to create a complete new set of zone files on your new server. It might be a good idea to delete the pri.* files on your new server first.
     
  3. jmroth

    jmroth New Member

    Thanks a lot for bringing me into the right direction!
    However, I also had to set status='1' in dns_nodes, the field was empty for some reason on the old server (why '1' and not 'n' I do not know ;) There also is a status field in dns_dep but I left it untouched, since it was already at '1', and still is after the update, just like dns_nodes.
    Regards,
    Marc
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    If the status field in dns_nodes is set to 0, the dns records are in the recycle bin. What you did is you restored the items from recycle bin by chnaging this value.
     

Share This Page