HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Tips/Tricks/Mods (http://www.howtoforge.com/forums/forumdisplay.php?f=29)
-   -   MyDNS to PowerDNS : Safe Migration (http://www.howtoforge.com/forums/showthread.php?t=44572)

zenny 2nd April 2010 13:36

MyDNS to PowerDNS : Safe Migration
 
[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/sho...2&postcount=24 ]

In case one has installed MyDNS-ng (as stated in the superb Falko's tutorial http://www.howtoforge.com/perfect-se...-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:
Quote:

Removing any system startup links for /etc/init.d/mydns ...
/etc/rc0.d/K20mydns
/etc/rc1.d/K20mydns
/etc/rc2.d/S20mydns
/etc/rc3.d/S20mydns
/etc/rc4.d/S20mydns
/etc/rc5.d/S20mydns
/etc/rc6.d/K20mydns
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:

Quote:

/var/src/mydns-1.2.8# make uninstall
Making uninstall in pkg
make[1]: Entering directory `/var/src/mydns-1.2.8/pkg'
make[1]: Nothing to be done for `uninstall'.
make[1]: Leaving directory `/var/src/mydns-1.2.8/pkg'
Making uninstall in contrib
make[1]: Entering directory `/var/src/mydns-1.2.8/contrib'
make[1]: Nothing to be done for `uninstall'.
make[1]: Leaving directory `/var/src/mydns-1.2.8/contrib'
Making uninstall in intl
make[1]: Entering directory `/var/src/mydns-1.2.8/intl'
if test "mydns" = "gettext" \
&& test '' = 'intl-compat.o'; then \
rm -f /usr/local/include/libintl.h; \
/bin/sh ../libtool --mode=uninstall \
rm -f /usr/local/lib/libintl.a; \
else \
: ; \
fi
if test 'no' = yes; then \
if test -f /usr/local/lib/charset.alias; then \
temp=/usr/local/lib/t-charset.alias; \
dest=/usr/local/lib/charset.alias; \
sed -f ref-del.sed $dest > $temp; \
if grep '^# Packages using this file: $' $temp > /dev/null; then \
rm -f $dest; \
else \
/usr/bin/install -c -m 644 $temp $dest; \
fi; \
rm -f $temp; \
fi; \
if test -f /usr/local/share/locale/locale.alias; then \
temp=/usr/local/share/locale/t-locale.alias; \
dest=/usr/local/share/locale/locale.alias; \
sed -f ref-del.sed $dest > $temp; \
if grep '^# Packages using this file: $' $temp > /dev/null; then \
rm -f $dest; \
else \
/usr/bin/install -c -m 644 $temp $dest; \
fi; \
rm -f $temp; \
fi; \
else \
: ; \
fi
if test "mydns" = "gettext"; then \
for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 Makefile.in config.charset locale.alias ref-add.sin ref-del.sin gmo.h gettextP.h hash-string.h plural-exp.h eval-plural.h os2compat.h libgnuintl.h loadinfo.h bindtextdom.c dcgettext.c dgettext.c gettext.c finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y plural-exp.c localcharset.c localename.c osdep.c os2compat.c intl-compat.c plural.c; do \
rm -f /usr/local/share/gettext/intl/$file; \
done; \
else \
: ; \
fi
make[1]: Leaving directory `/var/src/mydns-1.2.8/intl'
Making uninstall in po
make[1]: Entering directory `/var/src/mydns-1.2.8/po'
catalogs='es.gmo fr.gmo pt_BR.gmo'; \
for cat in $catalogs; do \
cat=`basename $cat`; \
lang=`echo $cat | sed -e 's/\.gmo$//'`; \
for lc in LC_MESSAGES ; do \
rm -f /usr/local/share/locale/$lang/$lc/mydns.mo; \
done; \
done
if test "mydns" = "gettext"; then \
for file in Makefile.in.in Makevars quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot ; do \
rm -f /usr/local/share/gettext/po/$file; \
done; \
else \
: ; \
fi
make[1]: Leaving directory `/var/src/mydns-1.2.8/po'
Making uninstall in m4
make[1]: Entering directory `/var/src/mydns-1.2.8/m4'
make[1]: Nothing to be done for `uninstall'.
make[1]: Leaving directory `/var/src/mydns-1.2.8/m4'
Making uninstall in doc
make[1]: Entering directory `/var/src/mydns-1.2.8/doc'
rm -f '/usr/local/share/doc/mydns/mydns.dvi'
rm -rf '/usr/local/share/doc/mydns/mydns.html'
cd '/usr/local/share/info' && rm -f mydns.info mydns.info-[0-9] mydns.info-[0-9][0-9] mydns.i[0-9] mydns.i[0-9][0-9]
rm -f '/usr/local/share/man/man5/mydns.conf.5'
rm -f '/usr/local/share/man/man8/mydns.8'
rm -f '/usr/local/share/man/man8/mydnscheck.8'
rm -f '/usr/local/share/man/man8/mydns-conf.8'
rm -f '/usr/local/share/man/man8/mydnsexport.8'
rm -f '/usr/local/share/man/man8/mydnsimport.8'
rm -f '/usr/local/share/man/man8/mydnsptrconvert.8'
rm -f '/usr/local/share/doc/mydns/mydns.pdf'
rm -f '/usr/local/share/doc/mydns/mydns.ps'
make[1]: Leaving directory `/var/src/mydns-1.2.8/doc'
Making uninstall in lib
make[1]: Entering directory `/var/src/mydns-1.2.8/lib'
make[1]: Nothing to be done for `uninstall'.
make[1]: Leaving directory `/var/src/mydns-1.2.8/lib'
Making uninstall in src
make[1]: Entering directory `/var/src/mydns-1.2.8/src'
Making uninstall in lib
make[2]: Entering directory `/var/src/mydns-1.2.8/src/lib'
make[2]: Nothing to be done for `uninstall'.
make[2]: Leaving directory `/var/src/mydns-1.2.8/src/lib'
Making uninstall in mydns
make[2]: Entering directory `/var/src/mydns-1.2.8/src/mydns'
rm -f '/usr/local/sbin/mydns'
make[2]: Leaving directory `/var/src/mydns-1.2.8/src/mydns'
Making uninstall in util
make[2]: Entering directory `/var/src/mydns-1.2.8/src/util'
rm -f '/usr/local/bin/mydnscheck'
rm -f '/usr/local/bin/mydnsexport'
rm -f '/usr/local/bin/mydnsimport'
rm -f '/usr/local/bin/mydnsptrconvert'
rm -f '/usr/local/bin/mydns-conf'
make[2]: Leaving directory `/var/src/mydns-1.2.8/src/util'
make[2]: Entering directory `/var/src/mydns-1.2.8/src'
make[2]: Nothing to be done for `uninstall-am'.
make[2]: Leaving directory `/var/src/mydns-1.2.8/src'
make[1]: Leaving directory `/var/src/mydns-1.2.8/src'
make[1]: Entering directory `/var/src/mydns-1.2.8'
make[1]: Nothing to be done for `uninstall-am'.
make[1]: Leaving directory `/var/src/mydns-1.2.8'
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:

Quote:

--------------------------------------------------------------------------------
_____ ___________ _____ __ _
|_ _/ ___| ___ \ / __ \ / _(_)
| | \ `--.| |_/ / | / \/ ___ _ __ | |_ _ __ _
| | `--. \ __/ | | / _ \| '_ \| _| |/ _` |
_| |_/\__/ / | | \__/\ (_) | | | | | | | (_| |
\___/\____/\_| \____/\___/|_| |_|_| |_|\__, |
__/ |
|___/
--------------------------------------------------------------------------------


>> Update

Operating System: Debian Lenny or compatible

This application will update ISPConfig 3 on your server.
MySQL root password []: mysqlrootpassword

Reconfigure Services? (yes,no) [yes]:

Configuring Postfix
Configuring Jailkit
Configuring SASL
Configuring PAM
Configuring Courier
Configuring Spamassassin
Configuring Amavisd
Configuring Getmail
Configuring Pureftpd
Configuring PowerDNS
Configuring Apache
Configuring vlogger
Configuring Apps vhost
Configuring Database
Configuring Firewall
Updating ISPConfig
ISPConfig Port [8080]:

Reconfigure Crontab? (yes,no) [yes]:

Updating Crontab
Restarting services ...
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..
Stopping Postfix Mail Transport Agent: postfix.
Starting Postfix Mail Transport Agent: postfix.
Stopping SASL Authentication Daemon: saslauthd.
Starting SASL Authentication Daemon: saslauthd.
Stopping amavisd: amavisd-new.
Starting amavisd: amavisd-new.
Stopping ClamAV daemon: clamd.
LibClamAV Warning: ************************************************** *********
LibClamAV Warning: *** This version of the ClamAV engine is outdated. ***
LibClamAV Warning: *** DON'T PANIC! Read http://www.clamav.net/support/faq ***
LibClamAV Warning: ************************************************** *********
LibClamAV Warning: ************************************************** *********
LibClamAV Warning: *** This version of the ClamAV engine is outdated. ***
LibClamAV Warning: *** DON'T PANIC! Read http://www.clamav.net/support/faq ***
LibClamAV Warning: ************************************************** *********
Starting ClamAV daemon: clamd .
Stopping Courier authentication services: authdaemond.
Starting Courier authentication services: authdaemond.
Stopping Courier IMAP server: imapd.
Starting Courier IMAP server: imapd.
Stopping Courier IMAP-SSL server: imapd-ssl.
Starting Courier IMAP-SSL server: imapd-ssl.
Stopping Courier POP3 server: pop3d.
Starting Courier POP3 server: pop3d.
Stopping Courier POP3-SSL server: pop3d-ssl.
Starting Courier POP3-SSL server: pop3d-ssl.
Restarting web server: apache2 ... waiting ..
Restarting ftp server: Running: /usr/sbin/pure-ftpd-mysql-virtualchroot -l mysql:/etc/pure-ftpd/db/mysql.conf -l pam -o -A -O clf:/var/log/pure-ftpd/transfer.log -b -u 1000 -E -H -B
Restarting ftp upload handler: pure-uploadscript.
Update finished.
Now, got to your ISPConfig Panel and add DNS as usual and it would be there. Enjoy and happy Easter!!

BorderAmigos 2nd April 2010 17:03

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

zenny 2nd April 2010 23:27

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...g-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.

BorderAmigos 2nd April 2010 23:41

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

zenny 4th April 2010 23:01

Searching for a mydns to powerdns migration script to transfer the records. Found an old post in the powerdns mailinglist, but not downloadable :-(

http://mailman.powerdns.com/pipermai...ly/004624.html

Any pointers, how can I backup the dns records from mydns and place it safely to the powedns? Thanks. z

admins 11th April 2010 18:35

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

Thanks
admins

pts0 14th April 2010 01:06

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

djtremors 18th September 2010 16:07

@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.

djtremors 20th September 2010 13:02

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

Rbqueiros 28th October 2010 14:49

Hi ppl,

I have a few problems too with mydns and im planning to move to powerdns.

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

Thank you in advanced

Roger


All times are GMT +2. The time now is 08:20.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.