Migrate PowerDNS zones stored in the Generic MySQL backend to INWX nameservers.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Nico Boehr 0162fb0ee1 this software is only licensed under GNU GPLv2, but not later versions. 3 years ago
inwxapi @ 02273b03d2 change inwx API git URL to inwx' repo 3 years ago
.gitignore ignore configuration 3 years ago
.gitmodules change inwx API git URL to inwx' repo 3 years ago
LICENSE add GPL2 3 years ago
README.md this software is only licensed under GNU GPLv2, but not later versions. 3 years ago
config.sample.ini add config sample 3 years ago
pdns-to-inwx.py add option to skip domains 3 years ago
switch-nameservers.py add script to change nameservers 3 years ago

README.md

PDNS to INWX

This script allows you to migrate your PowerDNS zones to INWX nameservers.

This works by connecting to a MySQL database, where we expect to find the PowerDNS zone data. This means that this script is only useful to you if you use the Generic MySQL backend in PowerDNS.

Limitations

  • INWX only allows TTLs ranging from 3600 (1 hour) to 86400 (1 day) seconds. The script automatically sets the TTL to 3600 seconds, if it is less than that and to 86400 seconds if it is more than that.
  • SOA and NS records are silently ignored.
  • probably more.

Usage

All scripts need a configuration file. You may find an example in config.sample.ini.

pdns-to-inwx.py

Copy zones from PowerDNS MySQL database to INWX.

usage: pdns-to-inwx.py [-h] [--delete-existing] [--switch-ns]
                       [--skip-domains SKIP_DOMAINS]
                       conffile

positional arguments:
  conffile              the configuration file to use

optional arguments:
  -h, --help            show this help message and exit
  --delete-existing     delete zones that already exist. DANGEROUS.
  --switch-ns           update domains to use INWX nameservers
  --skip-domains SKIP_DOMAINS
                        skip this domain. can be used multiple times.

switch-nameservers.py

Perform an UPDATE on all domains in the PowerDNS database to switch to INWX nameservers.

This is useful for a two-step process: first copy all records from PowerDNS to INWX, then test if all records were copied correctly and then switch to the INWX nameservers if everything is OK.

usage: switch-nameservers.py [-h] [--skip-domains SKIP_DOMAINS] conffile

positional arguments:
  conffile              the configuration file to use

optional arguments:
  -h, --help            show this help message and exit
  --skip-domains SKIP_DOMAINS
                        skip this domain. can be used multiple times.

Testing

I used this script to migrate my zones in April 2017. It worked just fine, but your mileage may vary.

I strongly recommend testing this script throughoutly in a testing environment. There is no guarantee.

License

This software is licensed under GNU GPL, version 2.

Copyright (C) 2017 Nico Boehr

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.