2011-2013ForgeRock ASdsreplication1OpenDJdsreplicationmanage OpenDJ directory data replicationdsreplicationsubcommandoptionsDescriptionThis 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 enable subcommand
and then initialize the contents of one of the servers with the contents of
the other using the initialize subcommand.SubcommandsThe following subcommands are supported.disableDisable replication on the specified server for the provided base
DN and removes references in the other servers with which it is
replicating data.enableUpdate the configuration of the servers to replicate the data
under the specified base DN. If one of the specified servers is already
replicating the data under the base DN with other servers, executing this
subcommand will update the configuration of all the servers. Thus it is
sufficient to execute the command line once for each server added to the
replication topology.initializeInitialize the contents of the data under the specified base DN
on the destination server with the contents on the source server. This
operation is required after enabling replication in order replication to
work. initialize-all can also be used for this
purpose.initialize-allInitialize the contents of the data under the specified base DN
on all the servers whose contents are being replicated with the contents
on the specified server. This operation is required after enabling
replication for replication to work. Run initialize
for each server to achieve the same effect.post-external-initializationThis subcommand must be called after initializing the contents of
all the replicated servers using the import-ldif
command, or by copying the database. You must specify the list of base DNs
that have been initialized, and you must provide the credentials of any
of the servers that are being replicated. See
pre-external-initialization --help for more
information.pre-external-initializationThis subcommand must be called before initializing the contents
of all the replicated servers using the import-ldif
command, or by copying the database. You must specify the list of base DNs
that have been initialized, and you must provide the credentials of any
of the servers that are being replicated. After calling this subcommand,
initialize the contents of all the servers in the topology, either by
using the same LDIF file or by copying the database to each of the
servers, then call the post-external-initialization
subcommand.purge-historicalLaunch a purge processing of the historical information stored
in the user entries by replication. Since this processing may take a
while, you must specify a maximum duration.statusDisplay a list with the basic replication configuration of the
base DNs of the servers defined in the registration information. If
no base DNs are specified as parameter, information for all base DNs
is displayed.OptionsThe following options are supported.Access advanced settings when running this command in interactive
mode.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.LDAP Connection OptionsMaximum length of time (in milliseconds) that can be taken to
establish a connection. Use '0' to specify no time out.Default value: 30000Directory server hostname or IP addressDefault value: localhost.localdomainUser ID of the global administrator to use to bind to the server.
For the enable subcommand, if no global administrator
was defined previously for any servers, the global administrator will be
created using the UID provided.Default value: adminGlobal administrator password file Certificate key store pathNickname of certificate for SSL client authenticationSASL bind optionsDirectory server administration port numberDefault value: 4444Certificate trust store pathDefault value: /path/to/opendj/config/admin-truststoreCertificate trust store PINCertificate key store PIN fileCertificate trust store PIN filePassword for the global administratorCertificate key store PINTrust all server SSL certificatesUtility Input/Output OptionsThe full path to the file where the equivalent non-interactive
commands will be written when this command is run in interactive
mode.Display the equivalent non-interactive option on standard output
when this command is run in interactive mode.Use non-interactive mode. If data in the command is missing, the
user is not prompted and the command exits with an error.No properties file will be used to get default command line
argument valuesPath to the file containing default property values used for
command line argumentsDo not write progress information to standard outputGeneral OptionsDisplay version informationDisplay usage informationExit Codes0The command completed successfully.> 0An error occurred.ExamplesThe following example enables and then initializes replication
for a new replica on opendj2.example.com from an existing
replica on opendj.example.com.$ dsreplication enable -I admin -w password -X -n -b dc=example,dc=com
--host1 opendj.example.com --port1 4444 --bindDN1 "cn=Directory Manager"
--bindPassword1 password --replicationPort1 8989
--host2 opendj2.example.com --port2 4444 --bindDN2 "cn=Directory Manager"
--bindPassword2 password --replicationPort2 8989
Establishing connections ..... Done.
Checking registration information ..... Done.
Updating remote references on server opendj.example.com:4444 ..... Done.
Configuring Replication port on server opendj2.example.com:4444 ..... Done.
Updating replication configuration for baseDN dc=example,dc=com on server
opendj.example.com:4444 ..... Done.
Updating replication configuration for baseDN dc=example,dc=com on server
opendj2.example.com:4444 ..... Done.
Updating registration configuration on server
opendj.example.com:4444 ..... Done.
Updating registration configuration on server
opendj2.example.com:4444 ..... Done.
Updating replication configuration for baseDN cn=schema on server
opendj.example.com:4444 ..... Done.
Updating replication configuration for baseDN cn=schema on server
opendj2.example.com:4444 ..... Done.
Initializing registration information on server opendj2.example.com:4444 with
the contents of server opendj.example.com:4444 ..... Done.
Initializing schema on server opendj2.example.com:4444 with the contents of
server opendj.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/.../opends-replication-7958637258600693490.log
for a detailed log of this operation.
$ dsreplication initialize-all -I admin -w password -X -n -b dc=example,dc=com
-h opendj.example.com -p 4444
Initializing base DN dc=example,dc=com with the contents from
opendj.example.com:4444: 160 entries processed (100 % complete).
Base DN initialized successfully.
See
/var/.../opends-replication-5020375834904394170.log
for a detailed log of this operation.