kea-admin - Man Page

Shell script for managing Kea databases


kea-admin [command] [backend] [-u database username] [-p database password] [-n database name] [-d scripts directory] [-4 | -6] [-o output file] [-v]


kea-admin is a shell script which offers database maintenance. In particular, it features database initialization, database version checking, and database schema upgrade.



Specifies the command to be issued to the servers. It can be one of the following:


Initializes a new database schema. This is useful during a new Kea installation. The database is initialized to the latest version supported by the version of the software being installed.


Reports the database backend version number. This is not necessarily equal to the Kea version number as each backend has its own versioning scheme.


Conducts a database schema upgrade. This is useful when upgrading Kea.


Dumps the contents of the lease database (for MySQL, PostgreSQL, or CQL backends) to a CSV (comma-separated values) text file. The first line of the file contains the column names. This is meant to be used as a diagnostic tool, so it provides a portable, human-readable form of the lease data.


Recounts lease statistics for MySQL or PostgreSQL database.


Specifies the backend type. Currently allowed backends are: memfile, mysql, and pgsql.

-u|--user username

Specifies the username when connecting to a database. If not specified, the default value of keatest is used.

-p|--password password

Specifies the password when connecting to a database. If not specified, the default value of keatest is used.

-n|--name database-name

Specifies the name of the database to connect to. If not specified, the default value of keatest is used.

-d|--directory script-directory

Specifies the override scripts directory. That script is used during upgrades, database initialization, and possibly other operations. If not specified, the default value of (prefix)/share/kea/scripts/ is used.

-o|--output output_file

Specifies the file to which the lease data will be dumped. Required for lease-dump.


Prints the kea-admin version and quits.


Directs kea-admin to lease-dump the DHCPv4 leases. Incompatible with the -6 option.


Directs kea-admin to lease-dump the DHCPv6 leases. Incompatible with the -4 option.


Kea comes with an extensive Kea Administrator Reference Manual that covers all aspects of running the Kea software - compilation, installation, configuration, configuration examples, and much more. Kea also features a Kea Messages Manual, which lists all possible messages Kea can print with a brief description for each of them. Both documents are available in various formats (.txt, .html, .pdf) with the Kea distribution. The Kea documentation is available at .

Kea source code is documented in the Kea Developer's Guide. Its online version is available at

The Kea project website is available at

Mailing Lists and Support

There are two public mailing lists available for the Kea project. kea-users (kea-users at is intended for Kea users, while kea-dev (kea-dev at is intended for Kea developers, prospective contributors, and other advanced users. Both lists are available at The community provides best-effort support on both of those lists.

ISC provides professional support for Kea services. See for details.

See Also

kea-dhcp4(8), kea-dhcp6(8), kea-dhcp-ddns(8), kea-ctrl-agent(8), keactrl(8), perfdhcp(8), kea-netconf(8), Kea Administrator Reference Manual.


Internet Systems Consortium

Referenced By

keactrl(8), kea-ctrl-agent(8), kea-dhcp4(8), kea-dhcp6(8), kea-dhcp-ddns(8), kea-lfc(8), kea-netconf(8), kea-shell(8), perfdhcp(8).

Apr 04, 2021 1.9.6 Kea