Skip to content

Instantly share code, notes, and snippets.

@gionn
Created June 27, 2012 09:00
Show Gist options
  • Save gionn/3002606 to your computer and use it in GitHub Desktop.
Save gionn/3002606 to your computer and use it in GitHub Desktop.
Migration script from Windows DNS to PowerDNS
#!/bin/bash
DOMAINARRAY=`cat /mnt/samba/winnt/system32/dns/domainlist`
for domainname in $DOMAINARRAY
do
echo " "
echo "$domainname being imported"
zone2sql --zone=$domainname.dns --gmysql --zone-name=$domainname | mysql -h
10.10.1.1 -D pdns -u pdns
echo "$domainname done!"
echo " "
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment