kea-admin.xml 8.1 KB
Newer Older
1
<!--
2
 - Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
3
 -
4 5 6
 - 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/.
7 8
-->

9
<!-- Converted by db4-upgrade version 1.1 -->
10
<refentry>
11
  <info>
12 13 14
    <productname>ISC Kea</productname>
    <date>Sep. 28, 2016</date>
    <edition>1.1.0</edition>
15
    <author><personname/><contrib>The Kea software has been written by a number of
16 17 18 19 20
        engineers working for ISC: Tomek Mrugalski, Stephen Morris, Marcin
        Siodelski, Thomas Markwalder, Francis Dupont, Jeremy C. Reed,
        Wlodek Wencel and Shawn Routhier.  That list is roughly in the
        chronological order in which the authors made their first
        contribution. For a complete list of authors and
21 22
        contributors, see AUTHORS file.</contrib><orgname>Internet Systems Consortium, Inc.</orgname></author>
  </info>
23 24 25 26

  <refmeta>
    <refentrytitle>kea-admin</refentrytitle>
    <manvolnum>8</manvolnum>
27
    <refmiscinfo class="manual">Kea</refmiscinfo>
28 29 30 31
  </refmeta>

  <refnamediv>
    <refname>kea-admin</refname>
Tomek Mrugalski's avatar
Tomek Mrugalski committed
32
    <refpurpose>Shell script for managing Kea databases</refpurpose>
33 34 35 36
  </refnamediv>

  <docinfo>
    <copyright>
37
      <year>2014-2017</year>
38 39 40 41 42
      <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
    </copyright>
  </docinfo>

  <refsynopsisdiv>
43
    <cmdsynopsis sepchar=" ">
Tomek Mrugalski's avatar
Tomek Mrugalski committed
44
      <command>kea-admin</command>
45 46 47 48 49 50 51 52
      <arg choice="opt" rep="norepeat">command</arg>
      <arg choice="opt" rep="norepeat">backend</arg>
      <arg choice="opt" rep="norepeat"><option>-u <replaceable class="parameter">database username</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-p <replaceable class="parameter">database password</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-n <replaceable class="parameter">database name</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-d <replaceable class="parameter">scripts directory</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-4 | -6</option></arg>
      <arg choice="opt" rep="norepeat"><option>-o <replaceable class="parameter">output file</replaceable></option></arg>
53 54 55 56 57 58 59
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>DESCRIPTION</title>
    <para>
      kea-admin is a shell script which offers database maintenance. In particular,
60
      it features database initialization, database version checking and
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
      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>
Tomek Mrugalski's avatar
Tomek Mrugalski committed
77
              <term>lease-init</term>
78
              <listitem>
Tomek Mrugalski's avatar
Tomek Mrugalski committed
79 80 81
                <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>
82 83 84 85
              </listitem>
            </varlistentry>

            <varlistentry>
Tomek Mrugalski's avatar
Tomek Mrugalski committed
86
              <term>lease-version</term>
87
              <listitem>
Tomek Mrugalski's avatar
Tomek Mrugalski committed
88 89 90
                <para>Reports lease database version. This is not necessarily
                equal to Kea version as each backend has its own versioning
                scheme.</para>
91 92 93 94
              </listitem>
            </varlistentry>

            <varlistentry>
Tomek Mrugalski's avatar
Tomek Mrugalski committed
95
              <term>lease-upgrade</term>
96
              <listitem>
Tomek Mrugalski's avatar
Tomek Mrugalski committed
97 98
                <para>Conducts lease database upgrade. This is useful when
                migrating between old and new Kea versions.</para>
99 100 101
              </listitem>
            </varlistentry>

102 103 104 105 106 107 108 109 110
            <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>
Andrei Pavel's avatar
Andrei Pavel committed
111
          </variablelist>
112

113 114 115
        </listitem>
      </varlistentry>

Tomek Mrugalski's avatar
Tomek Mrugalski committed
116 117 118 119 120 121 122 123 124 125
      <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>

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
      <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>

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
      <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>

194 195 196 197 198 199 200 201 202 203
    </variablelist>

  </refsect1>

  <refsect1>
    <title>SEE ALSO</title>
    <para>
      <citerefentry>
        <refentrytitle>keactrl</refentrytitle>
        <manvolnum>8</manvolnum>
204
      </citerefentry>,
205 206 207 208

      <citerefentry>
        <refentrytitle>kea-dhcp4</refentrytitle>
        <manvolnum>8</manvolnum>
209
      </citerefentry>,
210 211 212 213

      <citerefentry>
        <refentrytitle>kea-dhcp6</refentrytitle>
        <manvolnum>8</manvolnum>
214
      </citerefentry>,
215 216 217 218

      <citerefentry>
        <refentrytitle>kea-dhcp-ddns</refentrytitle>
        <manvolnum>8</manvolnum>
219 220
      </citerefentry>,

221 222 223 224 225
      <citerefentry>
        <refentrytitle>kea-ctrl-agent</refentrytitle>
        <manvolnum>8</manvolnum>
      </citerefentry>,

226 227 228 229 230 231 232 233 234 235
      <citerefentry>
        <refentrytitle>keactrl</refentrytitle>
        <manvolnum>8</manvolnum>
      </citerefentry>,

      <citerefentry>
        <refentrytitle>perfdhcp</refentrytitle>
        <manvolnum>8</manvolnum>
      </citerefentry>,

236
      <citetitle>Kea Administrator Guide</citetitle>.
237 238 239 240 241

    </para>
  </refsect1>

</refentry>