summaryrefslogtreecommitdiffstats
path: root/src/bin/admin/kea-admin.xml
blob: 7ee20bc89d5601562580de054b934077dddcbc80 (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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
               "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
	       [<!ENTITY mdash "&#8212;">]>
<!--
 - Copyright (C) 2014-2015 Internet Systems Consortium, Inc. ("ISC")
 -
 - 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/.
-->

<refentry>
  <refentryinfo>
    <date>Nov 5, 2014</date>
  </refentryinfo>

  <refmeta>
    <refentrytitle>kea-admin</refentrytitle>
    <manvolnum>8</manvolnum>
    <refmiscinfo>Kea</refmiscinfo>
  </refmeta>

  <refnamediv>
    <refname>kea-admin</refname>
    <refpurpose>Shell script for managing Kea databases</refpurpose>
  </refnamediv>

  <docinfo>
    <copyright>
      <year>2014</year>
      <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
    </copyright>
  </docinfo>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>kea-admin</command>
      <arg>command</arg>
      <arg>backend</arg>
      <arg><option>-u <replaceable class="parameter">database username</replaceable></option></arg>
      <arg><option>-p <replaceable class="parameter">database password</replaceable></option></arg>
      <arg><option>-n <replaceable class="parameter">database name</replaceable></option></arg>
      <arg><option>-d <replaceable class="parameter">scripts directory</replaceable></option></arg>
      <arg><option>-4 | -6</option></arg>
      <arg><option>-o <replaceable class="parameter">output file</replaceable></option></arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>DESCRIPTION</title>
    <para>
      kea-admin is a shell script which offers database maintenance. In particular,
      it features database initialization, database version checking and
      database schema upgrade.
    </para>
  </refsect1>

  <refsect1>
    <title>OPTIONS</title>
    <variablelist>
      <varlistentry>
        <term><option><replaceable class="parameter">command</replaceable></option></term>
        <listitem>
          <para>
            Command to be issued to the servers. It can be one of the following:
          </para>

          <variablelist>
            <varlistentry>
              <term>lease-init</term>
              <listitem>
                <para>Initializes a new lease database. Useful during first Kea
                installation. The database is initialized to the latest version
                supported by the version of the software.</para>
              </listitem>
            </varlistentry>

            <varlistentry>
              <term>lease-version</term>
              <listitem>
                <para>Reports lease database version. This is not necessarily
                equal to Kea version as each backend has its own versioning
                scheme.</para>
              </listitem>
            </varlistentry>

            <varlistentry>
              <term>lease-upgrade</term>
              <listitem>
                <para>Conducts lease database upgrade. This is useful when
                migrating between old and new Kea versions.</para>
              </listitem>
            </varlistentry>
          </variablelist>

            <varlistentry>
              <term>lease-dump</term>
              <listitem>
                <para>Dumps the contents of the lease database (MySQL and PostgreSQL
                backends) to text file. The content of the file consists of comma-separated-values
                (CSV) where each line in the file contains all of the values for a single lease.
                The first line of file is a header line containing the column names.</para>
              </listitem>
            </varlistentry>

        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option><replaceable class="parameter">backend</replaceable></option></term>
        <listitem>
          <para>
            Specifies backend type. Currently allowed backends are: memfile, mysql and
            pgsql.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>-u|--user <replaceable class="parameter">username</replaceable></option></term>
        <listitem>
          <para>
            Specify the username when connecting to a database. If not specified,
            the default value of keatest is used.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>-p|--password <replaceable class="parameter">password</replaceable></option></term>
        <listitem>
          <para>
            Specifies the password when connecting to a database. If not specified,
            the default value of keatest is used.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>-n|--name <replaceable class="parameter">database-name</replaceable></option></term>
        <listitem>
          <para>
            Specifies the database name to connect to. If not specified,
            the default value of keatest is used.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>-d|--directory <replaceable class="parameter">script-directory</replaceable></option></term>
        <listitem>
          <para>
            Used for 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.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>-o|--output <replaceable class="parameter">output_file</replaceable></option></term>
        <listitem>
          <para>
            Required for lease-dump, Specifies the file to which the lease data will be dumped.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>-4</option></term>
        <listitem>
          <para>
            Directs kea-admin to lease-dump the DHCPv4 leases. Incompatible with the -6 option.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>-6</option></term>
        <listitem>
          <para>
            Directs kea-admin to lease-dump the DHCPv6 leases. Incompatible with the -4 option.
          </para>
        </listitem>
      </varlistentry>

    </variablelist>

  </refsect1>

  <refsect1>
    <title>SEE ALSO</title>
    <para>
      <citerefentry>
        <refentrytitle>keactrl</refentrytitle>
        <manvolnum>8</manvolnum>
      </citerefentry>

      <citerefentry>
        <refentrytitle>kea-dhcp4</refentrytitle>
        <manvolnum>8</manvolnum>
      </citerefentry>

      <citerefentry>
        <refentrytitle>kea-dhcp6</refentrytitle>
        <manvolnum>8</manvolnum>
      </citerefentry>

      <citerefentry>
        <refentrytitle>kea-dhcp-ddns</refentrytitle>
        <manvolnum>8</manvolnum>
      </citerefentry>

    </para>
  </refsect1>

</refentry>