skip to navigation
skip to content

pdns 0.1

Command line client to synchronize PowerDNS hosted zones with local zone files

Latest Version: 0.1.4

The pdns script allows DNS zones hosted at PowerDNS to be synchronized with local bind-style zone files via the PowerDNS API.


$ pip install pdns


To download a zone:

$ pdns download --apikey {KEY} --domain {DOMAIN} {ZONEFILE}

These command line options can also be stored in a configuration file, e.g. config.ini:

apikey        = {KEY}
domain        = {DOMAIN}
zonefile      = {ZONEFILE}

And then invoke pdns as follows:

$ pdns download --config config.ini

To upload a zone:

$ pdns upload --config config.ini

And to show differences between the hosted zone and the local zonefile:

$ pdns diff --config config.ini


The pdns configuration file can specify the following options:

  • apikey:

    The API access key provided by PowerDNS. Note that an account must first be enabled (via the PowerDNS website) before it can be used.

  • domain:

    The name of the zone to be operated on.

  • zonefile:

    The filename of the local zone file. If specified in the configuration, it is taken to be relative to the configuration file. If specified on the command line, it is taken to be relative to the current working directory.

Several different profiles can be stored in the same configuration; each profile should have a section named after the domain. Global parameters can be stored in the “DEFAULT” section. For example:


# set some global parameters
apikey        = 2f16eef6-5b1f-4d80-96f7-0237da03db48

# set the default domain to manage
domain        =

zonefile      =

zonefile      =

Then, to upload the zones:

# upload ''
$ pdns upload -c config.ini

# upload ''
$ pdns upload -c config.ini -d
File Type Py Version Uploaded on Size
pdns-0.1.tar.gz (md5) Source 2014-03-03 19KB
  • Downloads (All Versions):
  • 0 downloads in the last day
  • 0 downloads in the last week
  • 182 downloads in the last month