2019-07-18 10:07:56 -04:00
|
|
|
..
|
2021-04-02 15:53:14 +03:00
|
|
|
Copyright (C) 2019-2021 Internet Systems Consortium, Inc. ("ISC")
|
2019-07-18 10:07:56 -04:00
|
|
|
|
|
|
|
This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
|
|
|
See the COPYRIGHT file distributed with this work for additional
|
|
|
|
information regarding copyright ownership.
|
|
|
|
|
|
|
|
|
2021-12-08 19:30:17 +00:00
|
|
|
``kea-admin`` - Shell script for managing Kea databases
|
|
|
|
-------------------------------------------------------
|
2019-07-18 10:07:56 -04:00
|
|
|
|
|
|
|
Synopsis
|
|
|
|
~~~~~~~~
|
|
|
|
|
2021-04-02 15:53:14 +03:00
|
|
|
:program:`kea-admin` [command] [backend] [**-h** database_host] [**-P** database_port] [**-u** database_username] [**-p** [database_password]] [**-n** database_name] [**-d** script_directory] [**-v**] [**-4** | **-6**] [**-o** output_file]
|
2019-07-18 10:07:56 -04:00
|
|
|
|
|
|
|
Description
|
|
|
|
~~~~~~~~~~~
|
|
|
|
|
2021-12-08 19:26:53 +00:00
|
|
|
``kea-admin`` is a shell script that offers database maintenance. In
|
2019-07-17 15:42:19 +02:00
|
|
|
particular, it features database initialization, database version
|
2021-12-08 19:26:53 +00:00
|
|
|
checking, and database schema upgrading.
|
2019-07-17 15:42:19 +02:00
|
|
|
|
2019-07-18 10:07:56 -04:00
|
|
|
Arguments
|
|
|
|
~~~~~~~~~
|
2019-07-17 15:42:19 +02:00
|
|
|
|
|
|
|
``command``
|
2019-07-18 10:07:56 -04:00
|
|
|
Specifies the command to be issued to the servers. It can be one of the following:
|
2019-07-17 15:42:19 +02:00
|
|
|
|
2021-12-08 19:26:53 +00:00
|
|
|
``db-init``
|
2019-11-20 15:16:32 +07:00
|
|
|
Initializes a new database schema. This is useful during a new Kea
|
2019-07-17 15:42:19 +02:00
|
|
|
installation. The database is initialized to the latest version
|
2019-11-20 15:16:32 +07:00
|
|
|
supported by the version of the software being installed.
|
|
|
|
|
2021-12-08 19:26:53 +00:00
|
|
|
``db-version``
|
2019-11-20 15:16:32 +07:00
|
|
|
Reports the database backend version number. This is not necessarily
|
2021-12-08 19:26:53 +00:00
|
|
|
equal to the Kea version number, as each backend has its own
|
2019-11-20 15:16:32 +07:00
|
|
|
versioning scheme.
|
|
|
|
|
2021-12-08 19:26:53 +00:00
|
|
|
``db-upgrade``
|
2019-11-20 15:16:32 +07:00
|
|
|
Conducts a database schema upgrade. This is useful when upgrading Kea.
|
|
|
|
|
2021-12-08 19:26:53 +00:00
|
|
|
``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.)
|
2019-11-20 15:16:32 +07:00
|
|
|
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.
|
2019-07-17 15:42:19 +02:00
|
|
|
|
2021-12-08 19:26:53 +00:00
|
|
|
``stats-recount``
|
|
|
|
Recounts lease statistics for a MySQL or PostgreSQL database.
|
2020-07-06 14:03:13 +02:00
|
|
|
|
2019-07-17 15:42:19 +02:00
|
|
|
``backend``
|
2019-07-18 10:07:56 -04:00
|
|
|
Specifies the backend type. Currently allowed backends are: memfile,
|
2021-12-08 19:26:53 +00:00
|
|
|
mysql, and pgsql; cql has been deprecated.
|
2021-04-02 15:53:14 +03:00
|
|
|
|
|
|
|
``-h|--host hostname``
|
2021-12-08 19:26:53 +00:00
|
|
|
Specifies the hostname when connecting to a database.
|
|
|
|
The default value is ``localhost``.
|
2021-04-02 15:53:14 +03:00
|
|
|
|
|
|
|
``-P|--port port``
|
|
|
|
Specifies the port when connecting to a database. If not specified,
|
|
|
|
the default value chosen by the database client is used.
|
2019-07-17 15:42:19 +02:00
|
|
|
|
|
|
|
``-u|--user username``
|
2021-12-08 19:26:53 +00:00
|
|
|
Specifies the username when connecting to a database.
|
2021-12-09 19:50:28 +00:00
|
|
|
The default value is ``keatest``.
|
2019-07-17 15:42:19 +02:00
|
|
|
|
|
|
|
``-p|--password password``
|
2021-04-02 15:53:14 +03:00
|
|
|
Specifies the password when connecting to a database.
|
|
|
|
If only ``-p`` or ``--password`` is given, the user is prompted for a password.
|
2021-12-08 19:26:53 +00:00
|
|
|
If not specified at all, the ``KEA_ADMIN_DB_PASSWORD`` environment variable
|
2021-04-14 15:44:38 +03:00
|
|
|
is checked for a value and used if it exists.
|
2021-12-08 19:26:53 +00:00
|
|
|
Otherwise the default value of ``keatest`` is used.
|
2019-07-17 15:42:19 +02:00
|
|
|
|
|
|
|
``-n|--name database-name``
|
2021-12-08 19:26:53 +00:00
|
|
|
Specifies the name of the database to connect to. The
|
|
|
|
default value is ``keatest``.
|
2019-07-17 15:42:19 +02:00
|
|
|
|
|
|
|
``-d|--directory script-directory``
|
2019-07-18 10:07:56 -04:00
|
|
|
Specifies the override scripts directory. That script is used during
|
2021-12-08 19:26:53 +00:00
|
|
|
upgrades, database initialization, and possibly other operations.
|
|
|
|
The default value is ``(prefix)/share/kea/scripts/``.
|
2019-07-17 15:42:19 +02:00
|
|
|
|
|
|
|
``-o|--output output_file``
|
2021-12-08 19:26:53 +00:00
|
|
|
Specifies the file to which the lease data will be dumped. Required for ``lease-dump``.
|
2019-07-17 15:42:19 +02:00
|
|
|
|
|
|
|
``-v|--version``
|
2019-07-18 10:07:56 -04:00
|
|
|
Prints the ``kea-admin`` version and quits.
|
2019-07-17 15:42:19 +02:00
|
|
|
|
|
|
|
``-4``
|
2019-07-18 10:07:56 -04:00
|
|
|
Directs ``kea-admin`` to lease-dump the DHCPv4 leases. Incompatible with
|
2019-07-17 15:42:19 +02:00
|
|
|
the -6 option.
|
|
|
|
|
|
|
|
``-6``
|
2019-07-18 10:07:56 -04:00
|
|
|
Directs ``kea-admin`` to lease-dump the DHCPv6 leases. Incompatible with
|
2019-07-17 15:42:19 +02:00
|
|
|
the -4 option.
|
|
|
|
|
2019-07-18 10:07:56 -04:00
|
|
|
Documentation
|
|
|
|
~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
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
|
2021-07-16 14:34:18 +03:00
|
|
|
https://kea.readthedocs.io.
|
2019-07-18 10:07:56 -04:00
|
|
|
|
2021-12-08 19:33:48 +00:00
|
|
|
Kea source code is documented in the Kea Developer's Guide,
|
|
|
|
available at https://reports.kea.isc.org/dev_guide/.
|
2019-07-18 10:07:56 -04:00
|
|
|
|
|
|
|
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) is intended for Kea users, while **kea-dev**
|
|
|
|
(kea-dev at lists.isc.org) is 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
|
|
|
|
~~~~~~~~
|
2019-07-17 15:42:19 +02:00
|
|
|
|
2019-07-18 10:07:56 -04:00
|
|
|
:manpage:`kea-dhcp4(8)`, :manpage:`kea-dhcp6(8)`,
|
|
|
|
:manpage:`kea-dhcp-ddns(8)`, :manpage:`kea-ctrl-agent(8)`, :manpage:`keactrl(8)`,
|
|
|
|
:manpage:`perfdhcp(8)`, :manpage:`kea-netconf(8)`, Kea Administrator Reference Manual.
|