<?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="dsreplication-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>dsreplication</application></refentrytitle>
<xi:include href="common.xml" xpointer='xpointer(//manvolnum[@name="v1m"])'/>
</refmeta>
<refnamediv>
<refname><application>dsreplication</application></refname>
<refpurpose>manage OpenDJ directory data replication</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>dsreplication</command>
<arg choice="plain"><replaceable>subcommand</replaceable></arg>
<arg>subcommand_opts</arg>
<arg>--advanced</arg>
<arg>-I <replaceable class="parameter">adminUID</replaceable></arg>
<sbr/><sbr/>
<arg>-b <replaceable class="parameter">baseDN</replaceable></arg>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-remote"]/*)'/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-auth"]/*[not(@name="sc-dn")])'/>
<sbr/><sbr/>
<arg>--displayCommand</arg>
<arg>--commandFilePath <replaceable class="parameter">path</replaceable></arg>
<arg>-n</arg>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-props"]/*)'/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-misc"]/*[@name="sc-quiet"])'/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-general"]/*)'/>
</cmdsynopsis>
</refsynopsisdiv>
<refsection>
<title>Description</title>
<para>
This utility can be used to configure replication between servers so that the
data of the servers is synchronized. For replication to work you must first
enable replication using the <command>enable</command> subcommand and then
initialize the contents of one of the servers with the contents of the other
using the <command>initialize</command> subcommand.
</para>
</refsection>
<refsection>
<title>Subcommands</title>
<para>
The following subcommands are supported.
</para>
<!-- Generated stuff -->
<xi:include href="scmd-dsreplication.xml" xpointer='xpointer(//refsection)'/>
<!-- End of generated stuff -->
</refsection>
<refsection>
<title>Options</title>
<para>
The following options are supported.
</para>
<variablelist>
<varlistentry>
<term><option>--advanced</option></term>
<listitem>
<para>
Access advanced settings when running this command in interactive mode.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-b, --baseDN</option> <replaceable
class="parameter">baseDN</replaceable></term>
<listitem>
<para>
Base DN of the data to be replicated, initialized or for which you want to
disable replication. Multiple base DNs can be provided by using this option
multiple times.</para>
</listitem>
</varlistentry>
</variablelist>
<refsection>
<title>LDAP Connection Options</title>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-remote"]/*)'/>
<varlistentry>
<term><option>-I, --adminUID</option> <replaceable
class="parameter">adminUID</replaceable></term>
<listitem>
<para>
User ID of the global administrator to use to bind to the server. For the
<command>enable</command> subcommand, if no global administrator was defined
previously for any servers, the global administrator will be created using the
UID provided (Default: admin).
</para>
</listitem>
</varlistentry>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-auth"]/*[not(@name="lc-dn")])'/>
</variablelist>
</refsection>
<refsection>
<title>Utility Input/Output Options</title>
<variablelist>
<varlistentry>
<term><option>--commandFilePath</option> <replaceable
class="parameter">path</replaceable></term>
<listitem>
<para>
The full path to the file where the equivalent non-interactive commands will be
written when this command is run in interactive mode.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--displayCommand</option></term>
<listitem>
<para>
Display the equivalent non-interactive option on standard output when this
command is run in interactive mode.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-n, --no-prompt</option></term>
<listitem>
<para>
Use non-interactive mode. If data in the command is missing, the user is not
prompted and the command exits with an error.
</para>
</listitem>
</varlistentry>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-props"]/*)'/>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-misc"]/*[@name="lc-quiet"])'/>
</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 enables and then initializes replication for a new replica
on <literal>dj2.example.com</literal> from an existing replica on
<literal>dj.example.com</literal>.
</para>
<literallayout><prompt
>$ </prompt><command>dsreplication enable -I admin -w password -X -n \
-b dc=example,dc=com --host1 dj.example.com --port1 4444 \
--bindDN1 "cn=Directory Manager" --bindPassword1 password \
--replicationPort1 8989 --host2 dj2.example.com --port2 4444 \
--bindDN2 "cn=Directory Manager" --bindPassword2 password \
--replicationPort2 8989</command></literallayout>
<screen>
Establishing connections ..... Done.
Checking registration information ..... Done.
Updating remote references on server dj.example.com:4444 ..... Done.
Configuring Replication port on server j2.example.com:4444 ..... Done.
Updating replication configuration for baseDN dc=example,dc=com on
server dj.example.com:4444 ..... Done.
Updating replication configuration for baseDN dc=example,dc=com on
server dj2.example.com:4444 ..... Done.
Updating registration configuration on server
dj.example.com:4444 ..... Done.
Updating registration configuration on server
dj2.example.com:4444 ..... Done.
Updating replication configuration for baseDN cn=schema on server
dj.example.com:4444 ..... Done.
Updating replication configuration for baseDN cn=schema on server
dj2.example.com:4444 ..... Done.
Initializing registration information on server dj2.example.com:4444
with the contents of server dj.example.com:4444 ..... Done.
Initializing schema on server dj2.example.com:4444 with the contents of
server dj.example.com:4444 ..... Done.
Replication has been successfully enabled. Note that for replication to
work you must initialize the contents of the base DN's that are being
replicated (use dsreplication initialize to do so).
See
/var/tmp/opendj-replication-7958637258600693490.log
for a detailed log of this operation.
</screen>
<literallayout><prompt
>$ </prompt><command>dsreplication initialize-all -I admin -w password -X -n \
-b dc=example,dc=com -h dj.example.com -p 4444</command></literallayout>
<screen>
Initializing base DN dc=example,dc=com with the contents from
dj.example.com:4444: 160 entries processed (100 % complete).
Base DN initialized successfully.
See
/var/tmp/opendj-replication-5020375834904394170.log
for a detailed log of this operation.
</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>