MyDNS to PowerDNS : Safe Migration

Discussion in 'Tips/Tricks/Mods' started by zenny, Apr 2, 2010.

?

Is this post useful to you?

  1. Yes (Gimme More)

    33.3%
  2. No (Rubbish)

    33.3%
  3. Don't know (Indecisive)

    33.3%
  1. zenny

    zenny Member

    [Sharing it so that everyone does not have to reinvent the wheel- struggling with so many threads in this useful forum ;-) Feel free to make changes as needed. Please note that this is Debian-Lenny (5.0.2 specific). This is in response to my own post here: http://www.howtoforge.com/forums/showpost.php?p=223962&postcount=24 ]

    In case one has installed MyDNS-ng (as stated in the superb Falko's tutorial http://www.howtoforge.com/perfect-server-debian-lenny-ispconfig3-p4) and wants to replace it with PowerDNS, do the following:

    1. Backup everything with this script: Use this script for backup: http://www.eurosistems.ro/back-res (change the parameters as per your requirement)

    2.Become root and execute:
    Code:
    $su <enter>
    #/etc/init.d/mydns stop
    3. Disable system-startup scripts:

    Code:
    # update-rc.d -f mydns remove
    You will see something like this:
    4. Make the init script unexecutable:
    Code:
    # chmod -x /etc/init.d/mydns
    or remove
    Code:
    # rm /etc/init.d/mydns
    5. Go to the source directory from where you installed MyDNS from source. Mine was /var/src/mydns-1.2.8

    Code:
     #cd /var/src/mydns-1.2.8
    # make uninstall]
    You will see something long like this:

    MAKE SURE THAT THERE ARE NO ERROR MESSAGES AT THIS POINT

    6. Install powerDNS:

    Code:
    #apt-get install pdns-server pdns-backend-mysql
    After the installation went okay, just restart to make sure that it is running:

    Code:
    # /etc/init.d/pdns restart
    Restarting PowerDNS authoritative nameserver: stopping and waiting..done
    Starting PowerDNS authoritative nameserver: started
    To check whether the pdns actually is listening to certain port, execute:

    Code:
    #netstat -anp | grep pdns
    7. Download latest ISPconfig3 from http://ispconfig.org/downloads.htm and extract it to /var/src (my favourite) like:

    Code:
    #mkdir /var/src
    #cd /var/src/
    #wget http://downloads.sourceforge.net/ispconfig/ISPConfig-3.0.2.1.tar.gz?use_mirror=
    Once the dowload is over, execute:

    Code:
    #tar -zxvf ISPConfig-3.0.2.1.tar.gz 
    Then change to the install directory /var/src/ispconfig3_install/install

    Code:
    #cd /var/src/ispconfig3_install/install
    and update ISPConfig3:

    Code:
    # php -q update.php
    You will see something like that and reply to the variables it asks for like MySQL password and other confirmations:

    Now, got to your ISPConfig Panel and add DNS as usual and it would be there. Enjoy and happy Easter!!
     
    Last edited: Apr 2, 2010
  2. BorderAmigos

    BorderAmigos New Member

    I have not used PowerDNS. What are it's advantages over MyDNS? Why switch?
     
  3. zenny

    zenny Member

    A small glitch on web panel

    The entire things works like charm (in my case, disclaimer ;-) ) including the pdns db showing relevant entries in the tables. The only thing that confused me was mydns was not killed until I rebooted (in my case a container), and still the ISPConfig Service Monitor states 'mydns working' instead of 'pdns working'. Thank ISPConfig team anyway!!!

    @BorderAmigos: The reason I wanted pdns is mydns seems to be yet production ready. (I had a similar problem like stated here http://www.howtoforge.com/forums/showthread.php?t=39767 and here http://www.clarksys.com/blog/2005/07/20/finally-migrating-to-powerdns/ and intermittent service. Even in the link I posted in the post above, Till mentioned about the deficiency and I experienced the same. I am using powerdns for the first time and just having a strange feeling over BIND9. ;-) However, Till and Falko reported that they have mydns without issues.
     
    Last edited: Apr 4, 2010
  4. BorderAmigos

    BorderAmigos New Member

    You can change the name of the DNS server in the language editor... System Tab, Languages Menu, monitor, en.lng >>> monitor_services_mysql_txt.
     
  5. zenny

    zenny Member

  6. admins

    admins Member

    Could you pls your pdns.conf ?
    PDNS would not start.

    Thanks
    admins
     
  7. pts0

    pts0 New Member

    Hi,

    I had already installed ispconfig3 with mydns and wanted to migrate to powerdns. I followed the tutorial all all gone well, but ispconfig 3 panel still pointing on mydns tables and now on powerdns. Did i forgot something ?

    pts0
     
  8. djtremors

    djtremors New Member

    @pst0: I believe you may be stuck on the same thing I ran into when testing this change for myself.

    The database structure is not the same as default powerdns ie check the remarked section in /usr/local/ispconfig/server/plugins-enabled/powerdns_plugin.inc.php which contains :

    CREATE TABLE `domains` (
    `id` int(11) NOT NULL auto_increment,
    `name` varchar(255) NOT NULL,
    `master` varchar(128) default NULL,
    `last_check` int(11) default NULL,
    `type` varchar(6) NOT NULL,
    `notified_serial` int(11) default NULL,
    `account` varchar(40) default NULL,
    `ispconfig_id` int(11) NOT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `name_index` (`name`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

    there's an extra field required (ispconfig_id) which will make it now work properly. do both tables in case.

    and you may or may not need to add

    $conf['services']['powerdns'] = true;

    to your /usr/local/ispconfig/server/lib/config.inc.php

    tremors.
     
    Last edited: Sep 18, 2010
  9. djtremors

    djtremors New Member

    Also, PowerDNS now (as of ver3.0) has a MyDNS backend so you can migrate a lot easier to powerdns.....
     
  10. Rbqueiros

    Rbqueiros New Member

    Hi ppl,

    I have a few problems too with mydns and i´m planning to move to powerdns.

    Can any one tell me if this tutorial works in ispconfig 3.0.3?

    Thank you in advanced

    Roger
     
  11. falko

    falko Super Moderator Howtoforge Staff

    I haven't tried it, but I see no reason why it shouldn't work for 3.0.3 as well. :)
     
  12. djtremors

    djtremors New Member

    yes it does work but the only catch is the migration script that I found in the ispconfig tar balls doesn't work too nicely with existing data. I managed to fudge it to my database to the point it started serving requests were it wouldn't without changes but this may not be the case now.
     

Share This Page