<?xml version="1.0" encoding="UTF-8"?>
<!--
! CCPL HEADER START
!
! This work is licensed under the Creative Commons
! Attribution-NonCommercial-NoDerivs 3.0 Unported License.
! To view a copy of this license, visit
! http://creativecommons.org/licenses/by-nc-nd/3.0/
! or send a letter to Creative Commons, 444 Castro Street,
! Suite 900, Mountain View, California, 94041, USA.
!
! You can also obtain a copy of the license at
! trunk/opendj3/legal-notices/CC-BY-NC-ND.txt.
! See the License for the specific language governing permissions
! and limitations under the License.
!
! If applicable, add the following below this CCPL HEADER, with the fields
! enclosed by brackets "[]" replaced with your own identifying information:
! Portions Copyright [yyyy] [name of copyright owner]
!
! CCPL HEADER END
!
! Copyright 2011-2012 ForgeRock AS
! Portions Copyright 2013 Jens Elkner
!
-->
<refentry xml:id="rebuild-index-1" xmlns="http://docbook.org/ns/docbook"
version="5.0" xml:lang="en"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://docbook.org/ns/docbook http://docbook.org/xml/5.0/xsd/docbook.xsd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="common.xml" xpointer='xpointer(//info[@name="info"])'/>
<refmeta>
<refentrytitle><application>rebuild-index</application></refentrytitle>
<xi:include href="common.xml" xpointer='xpointer(//manvolnum[@name="v1m"])'/>
</refmeta>
<refnamediv>
<refname><application>rebuild-index</application></refname>
<refpurpose>rebuild index after configuration change</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>rebuild-index</command>
<arg>-b <replaceable class="parameter">baseDN</replaceable></arg>
<arg>-i <replaceable class="parameter">index</replaceable></arg>
<arg>--rebuildAll</arg>
<arg>--rebuildDegraded</arg>
<arg>--tmpdirectory <replaceable class="parameter">path</replaceable></arg>
<sbr/><sbr/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-remote"]/*)'/>
<sbr/><sbr/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-auth"]/*)'/>
<sbr/><sbr/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-task"]/*[not(@name="sc-stop")])'/>
<sbr/><sbr/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-props"]/*)'/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-general"]/*)'/>
</cmdsynopsis>
</refsynopsisdiv>
<refsection>
<title>Description</title>
<para>
This utility can be used to rebuild index data within a backend based on the
Berkeley DB Java Edition.
</para>
</refsection>
<refsection>
<title>Options</title>
<para>
The following options are supported.
</para>
<variablelist>
<varlistentry>
<term><option>-b, --baseDN</option> <replaceable
class="parameter">baseDN</replaceable></term>
<listitem>
<para>
Base DN of a backend supporting indexing. Rebuild is performed on indexes within
the scope of the given base DN.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-i, --index</option> <replaceable
class="parameter">index</replaceable></term>
<listitem>
<para>
Names of index(es) to rebuild. For an attribute index this is simply an
attribute name. At least one index must be specified for rebuild. Cannot be used
with the <option>--rebuildAll</option> or <option>--rebuildDegraded</option>
options.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--rebuildAll</option></term>
<listitem>
<para>
Rebuild all indexes, including any DN2ID, DN2URI, VLV and extensible indexes.
Cannot be used with the <option>--index</option> or
<option>--rebuildDegraded</option> options.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--rebuildDegraded</option></term>
<listitem>
<para>
Rebuild all degraded indexes, including any DN2ID, DN2URI, VLV and extensible
indexes. Cannot be used with the <option>--index</option> or
<option>--rebuildAll</option> options.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--tmpdirectory</option> <replaceable
class="parameter">path</replaceable></term>
<listitem>
<para>
Path to temporary directory for index scratch files during index rebuilding
(Default: import-tmp).
</para>
</listitem>
</varlistentry>
</variablelist>
<refsection>
<title>Task Backend Connection Options</title>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-remote"]/*)'/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-auth"]/*)'/>
</variablelist>
</refsection>
<refsection>
<title>Task Scheduling Options</title>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-task"]/*[not(@name="lc-stop")])'/>
</variablelist>
</refsection>
<refsection>
<title>Utility Input/Output Options</title>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-props"]/*)'/>
</variablelist>
</refsection>
<refsection>
<title>General Options</title>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-general"]/*)'/>
</variablelist>
</refsection>
</refsection>
<refsection>
<title>Examples</title>
<informalexample>
<para>
The following example schedules a task to start immediately that rebuilds the
<literal>cn</literal> (common name) index.
</para>
<literallayout><prompt
>$ </prompt><command>rebuild-index -w password -b dc=example,dc=com -i cn -t 0 \
-p 4444 -h opendj.example.com -D "cn=Directory Manager"
</command></literallayout>
<screen>
Rebuild Index task 20110607160349596 scheduled to start Jun 7, 2011 4:03:49 PM
</screen>
</informalexample>
</refsection>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="env"])'/>
<refsection>
<title>Exit Codes</title>
<variablelist>
<varlistentry>
<term><errorcode>0</errorcode></term>
<listitem>
<para>
The command completed successfully.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><errorcode>1</errorcode></term>
<listitem>
<para>
An error occurred while parsing the command-line arguments.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="seeAlso"])'/>
</refentry>