<?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="export-ldif-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>export-ldif</application></refentrytitle>
<xi:include href="common.xml" xpointer='xpointer(//manvolnum[@name="v1m"])'/>
</refmeta>
<refnamediv>
<refname><application>export-ldif</application></refname>
<refpurpose>export OpenDJ directory data in LDIF</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>export-ldif</command>
<arg>-a</arg>
<arg>-c</arg>
<arg>-O</arg>
<arg>-n <replaceable class="parameter">backendName</replaceable></arg>
<arg>-b <replaceable class="parameter">incBranchDN</replaceable></arg>
<arg>-B <replaceable class="parameter">excBranchDN</replaceable></arg>
<arg>-i <replaceable class="parameter">incAttr</replaceable></arg>
<arg>-e <replaceable class="parameter">excAttr</replaceable></arg>
<arg>-I <replaceable class="parameter">incFilter</replaceable></arg>
<arg>-E <replaceable class="parameter">excFilter</replaceable></arg>
<arg>-l <replaceable class="parameter">outfile</replaceable></arg>
<arg>--wrapColumn <replaceable class="parameter">colNum</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"]/*)'/>
<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 export data from a directory server backend in LDIF
form.
</para>
</refsection>
<refsection>
<title>Options</title>
<para>
The following options are supported.
</para>
<variablelist>
<varlistentry>
<term><option>-a, --appendToLDIF</option></term>
<listitem>
<para>
Append an existing LDIF file rather than overwriting it.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-b, --includeBranch</option> <replaceable
class="parameter">branchDN</replaceable></term>
<listitem>
<para>
Base DN of a branch to include in the LDIF export.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-B, --excludeBranch</option> <replaceable
class="parameter">branchDN</replaceable></term>
<listitem>
<para>
Base DN of a branch to exclude from the LDIF export.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-c, --compress</option></term>
<listitem>
<para>
Compress the LDIF data as it is exported.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-e, --excludeAttribute</option> <replaceable
class="parameter">attribute</replaceable></term>
<listitem>
<para>
Attribute to exclude from the LDIF export.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-E, --excludeFilter</option> <replaceable
class="parameter">filter</replaceable></term>
<listitem>
<para>
Filter to identify entries to exclude from the LDIF export.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-i, --includeAttribute</option> <replaceable
class="parameter">attribute</replaceable></term>
<listitem>
<para>
Attribute to include in the LDIF export.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-I, --includeFilter</option> <replaceable
class="parameter">filter</replaceable></term>
<listitem>
<para>
Filter to identify entries to include in the LDIF export.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-l, --ldifFile</option> <replaceable
class="parameter">file</replaceable></term>
<listitem>
<para>
Path to the LDIF file to be written.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-n, --backendID</option> <replaceable
class="parameter">backendName</replaceable></term>
<listitem>
<para>
Backend ID for the backend to export.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-O, --excludeOperational</option></term>
<listitem>
<para>
Exclude operational attributes from the LDIF export.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--wrapColumn</option> <replaceable
class="parameter">column</replaceable></term>
<listitem>
<para>
Column at which to wrap long lines (Default: 0, i.e. no wrapping).
</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 exports data to a file, <filename>Example.ldif</filename>,
with the server offline.
</para>
<literallayout><prompt
>$ </prompt><command>export-ldif -b dc=example,dc=com -n userRoot \
-l /ldif/Example.ldif</command></literallayout>
<screen>
[21/Jun/2011:13:40:49 +0200] category=BACKEND severity=INFORMATION ...
...Exported 160 entries and skipped 0 in 0 seconds (average rate 1428.6/sec)
</screen>
</informalexample>
</refsection>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="env"])'/>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="exit-0-gt0"])'/>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="seeAlso"])'/>
</refentry>