KEA-ADMIN(8)

๐Ÿ’– KEA-ADMIN(8) ๐Ÿ’–

okay bestie, gather round, because this is the manual page for kea-admin, and it lives in the Kea section of your man pages. it's a shell script. she manages databases. she's booked and busy. ๐Ÿซถ


โœจ NAME โœจ

kea-admin โ€” a shell script for managing Kea databases ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

kea-admin [command] [backend] [-h database_host] [-P database_port] [-u
database_username] [-p [database_password]] [-n database_name] [-d
script_directory] [-v] [-x extra_argument [-x extra_argument ...]]  [-4
| -6] [-i input_file] [-o output_file] [-y]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so kea-admin is a shell script and she is literally the database maintenance girlie. what does she do? glad you asked:

  • database initialization โœจ
  • database version checking โœจ
  • database schema upgrading โœจ

that's the whole vibe. she's not doing your taxes, she's doing your schema. periodt.


๐Ÿ’œ ARGUMENTS ๐Ÿ’œ

๐ŸŽ€ command

this tells the servers what to actually do, and ngl it can only be one of these:

  • db-init โ€” initializes a brand new database schema. super useful when you're doing a fresh Kea install. the database gets initialized to the latest version supported by the version of the software being installed. fresh start, clean slate, main character energy.
  • db-version โ€” reports the database backend version number. โš ๏ธ heads up bestie: this is not necessarily equal to the Kea version number, because every backend has its own versioning scheme. they're all doing their own thing. respect it.
  • db-upgrade โ€” conducts a database schema upgrade. this is the one you call when you're upgrading Kea. glow-up time. ๐Ÿ’…
  • lease-dump โ€” dumps the contents of the lease database (for MySQL or PostgreSQL backends) into a CSV (comma-separated values) text file. ๐Ÿ—‚๏ธ (support for the Cassandra backend has been deprecated, rip.) the first line of the file has the column names. you can use this to switch from a database backend over to a memfile backend, and it also slaps as a diagnostic tool because it gives you the lease data in a portable form. ๐Ÿงš there are mandatory arguments you MUST use with this command: either -4 or -6 has to be specified, and either -o or --output has to be provided. no skips.
  • lease-upload โ€” uploads leases from a CSV (comma-separated values) text file into a MySQL or a PostgreSQL lease database. the CSV file needs to be in memfile format. ๐Ÿ“ mandatory args again, bestie: either -4 or -6 must be specified, and either -i or --input must be provided.
  • stats-recount โ€” recounts lease statistics for a MySQL or PostgreSQL database. she's counting. respectfully. ๐Ÿ˜Œ

๐ŸŒˆ backend

this specifies the backend type. currently allowed backends are: memfile, mysql, and pgsql. cql has been deprecated (gone but not forgotten ๐Ÿ•Š๏ธ).


โญ OPTIONS โญ

  • -h | --host hostname โ€” specifies the hostname when connecting to a database. the default value is localhost. ๐Ÿ 
  • -i | --input input_file โ€” specifies the CSV (comma-separated values) text file with the leases to be uploaded. this one is required for lease-upload. ๐Ÿ“ฅ
  • -P | --port port โ€” specifies the port when connecting to a database. if you don't specify it, whatever default value the database client chooses gets used. not our call, it's the client's. ๐Ÿคท
  • -u | --user username โ€” specifies the username when connecting to a database. the default value is keatest. ๐Ÿชช
  • -p | --password password โ€” specifies the password when connecting to a database. if you give only -p or --password, the user gets prompted for a password. if you don't specify it at all, the KEA_ADMIN_DB_PASSWORD environment variable is checked for a value and used if it exists. otherwise the default value of 1234 is used. ๐Ÿ” (yes, 1234. it said what it said.)
  • -n | --name database-name โ€” specifies the name of the database to connect to. the default value is keatest. ๐Ÿ“›
  • -d | --directory script-directory โ€” specifies the override scripts directory. that script gets used during upgrades, database initialization, and possibly other operations. the default value is (prefix)/share/kea/scripts/. ๐Ÿ“
  • -o | --output output_file โ€” specifies the file the lease data will be dumped to. required for lease-dump. ๐Ÿ“ค
  • -v | --version โ€” displays the Kea version. ๐Ÿ‘‘
  • -V โ€” displays the extended Kea version. extra. extended. elevated. ๐Ÿ’…
  • -4 โ€” directs kea-admin to lease-dump the DHCPv4 leases. incompatible with the -6 option. ๐Ÿšซ
  • -6 โ€” directs kea-admin to lease-dump the DHCPv6 leases. incompatible with the -4 option. ๐Ÿšซ
  • -x | --extra โ€” specifies an extra argument to pass to the database command tool, e.g. to invoke mysql with the --ssl argument. this can be repeated to pass more than one argument. โš ๏ธ quotes are not preserved, and you should avoid commands containing spaces. fr fr, keep it simple.
  • -y | --yes โ€” assume yes on overwriting temporary files. she's not gonna ask. ๐Ÿซก

๐Ÿ“š DOCUMENTATION ๐Ÿ“š

Kea comes with an extensive Kea Administrator Reference Manual that covers literally all aspects of running the Kea software โ€” compilation, installation, configuration, configuration examples, and much more. Kea also features a Kea Messages Manual, which lists every possible message 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 https://kea.readthedocs.io. ๐Ÿ’–

Kea source code is documented in the Kea Developer's Guide, available at https://reports.kea.isc.org/dev_guide/. ๐Ÿ› ๏ธ

the Kea project website is available at https://kea.isc.org. ๐ŸŒ


๐Ÿ’Œ MAILING LISTS AND SUPPORT ๐Ÿ’Œ

there are two public mailing lists available for the Kea project:

  • kea-users (kea-users at lists.isc.org) โ€” intended for Kea users ๐Ÿซถ
  • kea-dev (kea-dev at lists.isc.org) โ€” intended for Kea developers, prospective contributors, and other advanced users ๐Ÿง 

both lists are available at https://lists.isc.org. the community provides best-effort support on both of those lists. ๐Ÿซ‚

ISC provides professional support for Kea services. see https://www.isc.org/kea/ 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.


๐ŸŒŸ AUTHOR ๐ŸŒŸ

Internet Systems Consortium


2019-2025, Internet Systems Consortium


and that's the whole page bestie!! you made it to the end, iconic behavior honestly ๐ŸŽ€

this was Kea version 3.0.4, dated Oct 05, 2026 โ€” mwah, slay, go init a database or something ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from