mydnsimport man page

mydnsimport — Import zone data from external sources.


mydnsimport [-a, --axfr=host] [-D, --database=dbname] [-h, --host=hostname] [-o, --output] [-p, --password[=password]] [-r, --replace] [-t, --tinydns=file] [--notrim] [-u, --user=username] [-v, --verbose] [--help] [--version] ZONE [...]


mydnsimport imports zone data into MyDNS from an external source. If an import technique is specified (for example, via the --axfr option), the specified zone data will be loaded and mydnsimport will add the zone data to your database.

Currently, --axfr and --tinydns are the only import techniques recognized.


-a, --axfr=hostname[:port]

Load zone information from the specified hostname via the DNS-based AXFR command.

-o, --output

If this option is specified, mydnsimport outputs zone data in a computer-friendly format instead of modifying the database.  Each line of output consists of a line type (soa, rr, or ptr) followed by multiple fields.  Fields within each line are separated by the TAB (ASCII 0x09) character.  See Line Syntax, below.

-r, --replace

When importing, if the zone specified already exists, mydnsimport will refuse to make changes to the database unless this flag is provided. When this flag is provided, if the zone already exists, its SOA record will be updated (from the external source), all resource records for that zone are purged, and a new set of resource records is loaded from the external source.


Normally the zone origin is removed from labels when importing, in order to save space in the database.  In other words, becomes just host.  Using the --notrim option inhibits this behavior.

-D, --database=dbname

Use the database called dbname.

-h, --host=hostname

Connect to database server at hostname.

-p, --pass=password

Supply password when connecting to the database server.  If the password argument is omitted, it will be prompted on the tty.

-t, --tinydns=file

Load zone information from the specified file, which is in tinydns-data format.  When importing from a tinydns data file, zone may be omitted from the command line, in which case all zones found in the file are imported.

-u, --user=username

Use username when connecting to the database server.

-v, --verbose

Enable verbose output while running.


Display program help and exit.


Output version number and exit.

Line Syntax

When started with the -o (--output) option, mydnsimport outputs lines in the following format:


"soa" <TAB> origin <TAB> ns <TAB> mbox <TAB> serial <TAB> refresh <TAB> retry <TAB> expire <TAB> minimum <TAB> ttl


"rr" <TAB> name <TAB> type <TAB> data <TAB> aux <TAB> ttl


"ptr" <TAB> address <TAB> name <TAB> ttl


Don Moore <>  Howard Wilkinson <>


See Also

mydns(8), mydns.conf(5), mydnscheck(8), mydnsexport(8)

Referenced By

mydns(8), mydnscheck(8), mydns-conf(8), mydnsexport(8).

Feb 2017 mydns System Administrator's Manual