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)

  2. No (Rubbish)

  3. Don't know (Indecisive)

  1. zenny

    zenny New 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: ]

    In case one has installed MyDNS-ng (as stated in the superb Falko's tutorial and wants to replace it with PowerDNS, do the following:

    1. Backup everything with this script: Use this script for backup: (change the parameters as per your requirement)

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

    # update-rc.d -f mydns remove
    You will see something like this:
    4. Make the init script unexecutable:
    # chmod -x /etc/init.d/mydns
    or remove
    # 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

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


    6. Install powerDNS:

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

    # /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:

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

    #mkdir /var/src
    #cd /var/src/
    Once the dowload is over, execute:

    #tar -zxvf ISPConfig- 
    Then change to the install directory /var/src/ispconfig3_install/install

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

    # 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 New 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 and here 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 New Member

  6. admins

    admins Member HowtoForge Supporter

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

  7. pts0

    pts0 New Member HowtoForge Supporter


    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 ?

  8. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    @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/ 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`)

    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/

    Last edited: Sep 18, 2010
  9. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    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

  11. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

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

    djtremors ISPConfig Developer ISPConfig Developer

    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