command
Specifies the command to be issued to the servers. It can be one of the following:
db-init
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.
db-version
Reports the database backend version number. This is not necessarily equal to the Kea
version number, as each backend has its own versioning scheme.
db-upgrade
Conducts a database schema upgrade. This is useful when upgrading Kea.
lease-dump
Dumps the contents of the lease database (for MySQL or PostgreSQL backends) to a CSV
(comma-separated values) text file. (Support for the Cassandra backend has been
deprecated.) The first line of the file contains the column names. This can be used as a
way to switch from a database backend to a memfile backend. It can also be used as a
diagnostic tool, as it provides a portable form of the lease data. There are other
mandatory arguments that must be used together with this command: either -4 or -6 must be
specified, and either -o or --output must be provided.
lease-upload
Uploads leases from a CSV (comma-separated values) text file to a MySQL or a PostgreSQL
lease database. The CSV file needs to be in memfile format. There are other mandatory
arguments that must be used together with this command: 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.
backend
Specifies the backend type. Currently allowed backends are: memfile, mysql, and pgsql; cql has
been deprecated.
-h|--hosthostname
Specifies the hostname when connecting to a database. The default value is localhost.
-i|--inputinput_file
Specifies the CSV (comma-separated values) text file with the leases to be uploaded; required for
lease-upload.
-P|--portport
Specifies the port when connecting to a database. If not specified, the default value chosen by
the database client is used.
-u|--userusername
Specifies the username when connecting to a database. The default value is keatest.
-p|--passwordpassword
Specifies the password when connecting to a database. If only -p or --password is given, the user
is prompted for a password. If not specified at all, the KEA_ADMIN_DB_PASSWORD environment
variable is checked for a value and used if it exists. Otherwise the default value of keatest is
used.
-n|--namedatabase-name
Specifies the name of the database to connect to. The default value is keatest.
-d|--directoryscript-directory
Specifies the override scripts directory. That script is used during upgrades, database
initialization, and possibly other operations. The default value is (prefix)/share/kea/scripts/.
-o|--outputoutput_file
Specifies the file to which the lease data will be dumped. Required for lease-dump.
-v|--version
Displays the Kea version.
-V Displays the extended Kea version.
-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.
Avoid commands containing spaces.
-y|--yes
Assume yes on overwriting temporary files.