summaryrefslogtreecommitdiffstats
path: root/doc/sphinx/_build/man/kea-admin.8
blob: 8f1816a14c4e6341159ba3c66bb66e19e5b441e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
.\" Man page generated from reStructuredText.
.
.TH "KEA-ADMIN" "8" "Jul 26, 2022" "2.2.0" "Kea"
.SH NAME
kea-admin \- Shell script for managing Kea databases
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH SYNOPSIS
.sp
\fBkea\-admin\fP [command] [backend] [\fB\-h\fP database_host]
[\fB\-P\fP database_port] [\fB\-u\fP database_username]
[\fB\-p\fP [database_password]] [\fB\-n\fP database_name] [\fB\-d\fP script_directory]
[\fB\-v\fP] [\fB\-x\fP extra_argument [\fB\-x\fP extra_argument ...]]
[\fB\-4\fP | \fB\-6\fP] [\fB\-i\fP input_file] [\fB\-o\fP output_file] [\fB\-y\fP]
.SH DESCRIPTION
.sp
\fBkea\-admin\fP is a shell script that offers database maintenance. In
particular, it features database initialization, database version
checking, and database schema upgrading.
.SH ARGUMENTS
.INDENT 0.0
.TP
.B \fBcommand\fP
Specifies the command to be issued to the servers. It can be one of the
following:
.INDENT 7.0
.TP
.B \fBdb\-init\fP
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.
.TP
.B \fBdb\-version\fP
Reports the database backend version number. This is not necessarily
equal to the Kea version number, as each backend has its own
versioning scheme.
.TP
.B \fBdb\-upgrade\fP
Conducts a database schema upgrade. This is useful when upgrading Kea.
.TP
.B \fBlease\-dump\fP
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.
Alternatively, it can be used as a diagnostic tool, so it provides a
portable form of the lease data.
.TP
.B \fBlease\-upload\fP
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.
.TP
.B \fBstats\-recount\fP
Recounts lease statistics for a MySQL or PostgreSQL database.
.UNINDENT
.TP
.B \fBbackend\fP
Specifies the backend type. Currently allowed backends are: memfile,
mysql, and pgsql; cql has been deprecated.
.TP
.B \fB\-h|\-\-host hostname\fP
Specifies the hostname when connecting to a database.
The default value is \fBlocalhost\fP\&.
.TP
.B \fB\-P|\-\-port port\fP
Specifies the port when connecting to a database. If not specified,
the default value chosen by the database client is used.
.TP
.B \fB\-u|\-\-user username\fP
Specifies the username when connecting to a database.
The default value is \fBkeatest\fP\&.
.TP
.B \fB\-p|\-\-password password\fP
Specifies the password when connecting to a database.
If only \fB\-p\fP or \fB\-\-password\fP is given, the user is prompted for a password.
If not specified at all, the \fBKEA_ADMIN_DB_PASSWORD\fP environment variable
is checked for a value and used if it exists.
Otherwise the default value of \fBkeatest\fP is used.
.TP
.B \fB\-n|\-\-name database\-name\fP
Specifies the name of the database to connect to. The
default value is \fBkeatest\fP\&.
.TP
.B \fB\-d|\-\-directory script\-directory\fP
Specifies the override scripts directory. That script is used during
upgrades, database initialization, and possibly other operations.
The default value is \fB(prefix)/share/kea/scripts/\fP\&.
.TP
.B \fB\-o|\-\-output output_file\fP
Specifies the file to which the lease data will be dumped. Required for
\fBlease\-dump\fP\&.
.TP
.B \fB\-v|\-\-version\fP
Prints the \fBkea\-admin\fP version and quits.
.TP
.B \fB\-4\fP
Directs \fBkea\-admin\fP to lease\-dump the DHCPv4 leases. Incompatible with
the \-6 option.
.TP
.B \fB\-6\fP
Directs \fBkea\-admin\fP to lease\-dump the DHCPv6 leases. Incompatible with
the \-4 option.
.TP
.B \fB\-x|\-\-extra\fP
Specifies an extra argument to pass to the database command tool e.g.
to invoke \fBmysql\fP with the \fB\-\-ssl\fP argument. This can be repeated
to pass more than one argument. Quotes are not preserved. Avoid commands
containing spaces.
.TP
.B \fB\-y|\-\-yes\fP
Assume yes on overwriting temporary files.
.UNINDENT
.SH DOCUMENTATION
.sp
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
\fI\%https://kea.readthedocs.io\fP\&.
.sp
Kea source code is documented in the Kea Developer\(aqs Guide,
available at \fI\%https://reports.kea.isc.org/dev_guide/\fP\&.
.sp
The Kea project website is available at \fI\%https://kea.isc.org\fP\&.
.SH MAILING LISTS AND SUPPORT
.sp
There are two public mailing lists available for the Kea project. \fBkea\-users\fP
(kea\-users at lists.isc.org) is intended for Kea users, while \fBkea\-dev\fP
(kea\-dev at lists.isc.org) is intended for Kea developers, prospective
contributors, and other advanced users. Both lists are available at
\fI\%https://lists.isc.org\fP\&. The community provides best\-effort support
on both of those lists.
.sp
ISC provides professional support for Kea services. See
\fI\%https://www.isc.org/kea/\fP for details.
.SH SEE ALSO
.sp
\fBkea\-dhcp4(8)\fP, \fBkea\-dhcp6(8)\fP,
\fBkea\-dhcp\-ddns(8)\fP, \fBkea\-ctrl\-agent(8)\fP,
\fBkeactrl(8)\fP, \fBperfdhcp(8)\fP, \fBkea\-netconf(8)\fP,
Kea Administrator Reference Manual.
.SH AUTHOR
Internet Systems Consortium
.SH COPYRIGHT
2019-2022, Internet Systems Consortium
.\" Generated by docutils manpage writer.
.