mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Mark Craig
17.54.2014 dab677b887c19f49a0e298f80f55c9ef8d81a85b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
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
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
<?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-2014 ForgeRock AS
  !    
-->
<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'>
 <info><copyright><year>2011-2014</year><holder>ForgeRock AS</holder></copyright></info>
 <refmeta>
  <refentrytitle>dsreplication</refentrytitle><manvolnum>1</manvolnum>
  <refmiscinfo class="software">OpenDJ</refmiscinfo>
  <refmiscinfo class="version"><?eval ${docTargetVersion}?></refmiscinfo>
 </refmeta>
 <refnamediv>
  <refname>dsreplication</refname>
  <refpurpose>manage OpenDJ directory data replication</refpurpose>
 </refnamediv>
 <refsynopsisdiv>
  <cmdsynopsis>
   <command>dsreplication</command>
   <command><replaceable>subcommand</replaceable></command>
   <arg>options</arg>
  </cmdsynopsis>
 </refsynopsisdiv>
 <refsect1>
  <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>
 </refsect1>
 <refsect1>
  <title>Global 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 {baseDN}</option></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>
  <refsect2>
   <title>LDAP Connection Options</title>
   <variablelist>
    <varlistentry>
     <term><option>--connectTimeout {timeout}</option></term>
     <listitem>
      <para>Maximum length of time (in milliseconds) that can be taken to
      establish a connection. Use '0' to specify no time out.</para>
      <para>Default value: 30000</para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><option>-h, --hostname {host}</option></term>
     <listitem>
      <para>Directory server hostname or IP address</para>
      <para>Default value: localhost.localdomain</para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><option>-I, --adminUID {adminUID}</option></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.</para>
      <para>Default value: admin</para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><option>-j, --adminPasswordFile {bindPasswordFile}</option></term>
     <listitem>
      <para>Global administrator password file</para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><option>-K, --keyStorePath {keyStorePath}</option></term>
     <listitem>
      <para> Certificate key store path</para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><option>-N, --certNickname {nickname}</option></term>
     <listitem>
      <para>Nickname of certificate for SSL client authentication</para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><option>-o, --saslOption {name=value}</option></term>
     <listitem>
      <para>SASL bind options</para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><option>-p, --port {port}</option></term>
     <listitem>
      <para>Directory server administration port number</para>
      <para>Default value: 4444</para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><option>-P, --trustStorePath {trustStorePath}</option></term>
     <listitem>
      <para>Certificate trust store path</para>
      <para>Default value: /path/to/opendj/config/admin-truststore</para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><option>-T, --trustStorePassword {trustStorePassword}</option></term>
     <listitem>
      <para>Certificate trust store PIN</para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><option>-u, --keyStorePasswordFile {keyStorePasswordFile}</option></term>
     <listitem>
      <para>Certificate key store PIN file</para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><option>-U, --trustStorePasswordFile {path}</option></term>
     <listitem>
      <para>Certificate trust store PIN file</para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><option>-w, --adminPassword {bindPassword}</option></term>
     <listitem>
      <para>Password for the global administrator</para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><option>-W, --keyStorePassword {keyStorePassword}</option></term>
     <listitem>
      <para>Certificate key store PIN</para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><option>-X, --trustAll</option></term>
     <listitem>
      <para>Trust all server SSL certificates</para>
     </listitem>
    </varlistentry>
   </variablelist>
  </refsect2>
  <refsect2>
   <title>Utility Input/Output Options</title>
   <variablelist>
    <varlistentry>
     <term><option>--commandFilePath {path}</option></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>
    <varlistentry>
     <term><option>--noPropertiesFile</option></term>
     <listitem>
      <para>No properties file will be used to get default command line
      argument values</para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><option>--propertiesFilePath {propertiesFilePath}</option></term>
     <listitem>
      <para>Path to the file containing default property values used for
      command line arguments</para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><option>-Q, --quiet</option></term>
     <listitem>
      <para>Do not write progress information to standard output</para>
     </listitem>
    </varlistentry>
   </variablelist>
  </refsect2>
  <refsect2>
   <title>General Options</title>
   <variablelist>
    <varlistentry>
     <term><option>--version</option></term>
     <listitem>
      <para>Display version information</para>
     </listitem>
    </varlistentry>
     <varlistentry>
     <term><option>-?, -H, --help</option></term>
     <listitem>
      <para>Display usage information</para>
     </listitem>
    </varlistentry>
   </variablelist>
  </refsect2>
 </refsect1>
 <refsect1>
  <title>Exit Codes</title>
   <variablelist>
    <varlistentry>
     <term>0</term>
     <listitem>
      <para>The command completed successfully.</para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term>&gt; 0</term>
     <listitem>
      <para>An error occurred.</para>
     </listitem>
    </varlistentry>
   </variablelist>
 </refsect1>
 <refsect1>
  <title>Subcommands</title>
  <para>The following subcommands are supported.</para>
  <variablelist>
   <varlistentry>
    <term><command>disable</command></term>
    <listitem>
     <para>Disable replication on the specified server for the provided base
     DN and removes references in the other servers with which it is
     replicating data.</para>
 
     <variablelist>
      <title>Subcommand Options</title>
 
      <para>
       In addition to global options, these subcommand options are supported.
      </para>
 
      <varlistentry>
       <term><option>-a, --disableAll</option></term>
       <listitem>
        <para>
         Disable the replication configuration on the specified server.  The
         contents of the server are no longer replicated and the replication server
         (changelog and replication port) is disabled if it is configured.
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>-D, --bindDN {bindDN}</option></term>
       <listitem>
        <para>
         DN to use to bind to the server where we want to disable replication.  This
         option must be used when no Global Administrator has been defined on the
         server or if the user does not want to remove references in the other
         replicated servers.  The password provided for the Global Administrator
         will be used when specifying this option.
        </para>
 
        <para>
         Default value: cn=Directory Manager
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--disableReplicationServer</option></term>
       <listitem>
        <para>
         Disable the replication server.  The replication port and change log are
         disabled on the specified server.
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>-h, --hostname {host}</option></term>
       <listitem>
        <para>
         Directory server hostname or IP address
        </para>
 
        <para>
         Default value: <replaceable>configured-hostname</replaceable>
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>-p, --port {port}</option></term>
       <listitem>
        <para>
         Directory server administration port number
        </para>
 
        <para>
         Default value: <replaceable>configured-admin-port</replaceable>
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><command>enable</command></term>
    <listitem>
     <para>Update 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.</para>
 
     <variablelist>
      <title>Subcommand Options</title>
 
      <para>
       In addition to global options, these subcommand options are supported.
      </para>
 
 
      <varlistentry>
       <term><option>-h, --host1 {host}</option></term>
       <listitem>
        <para>
         Fully qualified host name or IP address of the first server whose contents
         will be replicated.
        </para>
 
        <para>
         Default value: <replaceable>configured-hostname</replaceable>
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>-p, --port1 {port}</option></term>
       <listitem>
        <para>
         Directory server administration port number of the first server whose
         contents will be replicated.
        </para>
 
        <para>
         Default value: <replaceable>configured-admin-port</replaceable>
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>-D, --bindDN1 {bindDN}</option></term>
       <listitem>
        <para>
         DN to use to bind to the first server whose contents will be replicated.
         If not specified the global administrator will be used to bind.
        </para>
 
        <para>
         Default value: cn=Directory Manager
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--bindPassword1 {bindPassword}</option></term>
       <listitem>
        <para>
         Password to use to bind to the first server whose contents will be
         replicated.  If no bind DN was specified for the first server the password
         of the global administrator will be used to bind.
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--bindPasswordFile1 {bindPasswordFile}</option></term>
       <listitem>
        <para>
         File containing the password to use to bind to the first server whose
         contents will be replicated.  If no bind DN was specified for the first
         server the password of the global administrator will be used to bind.
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>-r, --replicationPort1 {port}</option></term>
       <listitem>
        <para>
         Port that will be used by the replication mechanism in the first server to
         communicate with the other servers.  You have to specify this option only
         if replication was not previously configured in the first server.
        </para>
 
        <para>
         Default value: 8989
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--secureReplication1</option></term>
       <listitem>
        <para>
         Specifies whether or not the communication through the replication port of
         the first server is encrypted or not.  This option will only be taken into
         account the first time replication is configured on the first server.
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--noReplicationServer1</option></term>
       <listitem>
        <para>
         Do not configure a replication port or change log on the first server. The
         first server will contain replicated data but will not contain a change log
         of modifications made to the replicated data. Note that each replicated
         topology must contain at least two servers with a change log to avoid a
         single point of failure.
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--onlyReplicationServer1</option></term>
       <listitem>
        <para>
         Configure only a change log and replication port on the first server.  The
         first server will not contain replicated data, but will contain a change
         log of the modifications made to the replicated data on other servers.
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>-O, --host2 {host}</option></term>
       <listitem>
        <para>
         Fully qualified host name or IP address of the second server whose contents
         will be replicated.
        </para>
 
        <para>
         Default value: <replaceable>configured-hostname</replaceable>
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--port2 {port}</option></term>
       <listitem>
        <para>
         Directory server administration port number of the second server whose
         contents will be replicated.
        </para>
 
        <para>
         Default value: <replaceable>configured-admin-port</replaceable>
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--bindDN2 {bindDN}</option></term>
       <listitem>
        <para>
         DN to use to bind to the second server whose contents will be replicated.
         If not specified the global administrator will be used to bind.
        </para>
 
        <para>
         Default value: cn=Directory Manager
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--bindPassword2 {bindPassword}</option></term>
       <listitem>
        <para>
         Password to use to bind to the second server whose contents will be
         replicated.  If no bind DN was specified for the second server the password
         of the global administrator will be used to bind.
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>-F, --bindPasswordFile2 {bindPasswordFile}</option></term>
       <listitem>
        <para>
         File containing the password to use to bind to the second server whose
         contents will be replicated.  If no bind DN was specified for the second
         server the password of the global administrator will be used to bind.
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>-R, --replicationPort2 {port}</option></term>
       <listitem>
        <para>
         Port that will be used by the replication mechanism in the second server to
         communicate with the other servers.  You have to specify this option only
         if replication was not previously configured in the second server.
        </para>
 
        <para>
         Default value: 8989
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--secureReplication2</option></term>
       <listitem>
        <para>
         Specifies whether or not the communication through the replication port of
         the second server is encrypted or not.  This option will only be taken into
         account the first time replication is configured on the second server.
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--noReplicationServer2</option></term>
       <listitem>
        <para>
         Do not configure a replication port or change log on the second server. The
        second server will contain replicated data but will not contain a change
        log of modifications made to the replicated data. Note that each replicated
        topology must contain at least two servers with a change log to avoid a
        single point of failure.
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--onlyReplicationServer2</option></term>
       <listitem>
        <para>
         Configure only a change log and replication port on the second server.  The
         second server will not contain replicated data, but will contain a change
         log of the modifications made to the replicated data on other servers.
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>-S, --skipPortCheck</option></term>
       <listitem>
        <para>
         Skip the check to determine whether the specified replication ports are
         usable.
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--noSchemaReplication</option></term>
       <listitem>
        <para>
         Do not replicate the schema between the servers.
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--useSecondServerAsSchemaSource</option></term>
       <listitem>
        <para>
         Use the second server to initialize the schema of the first server.  If
         this option nor option --noSchemaReplication are specified the schema of
         the first server will be used to initialize the schema of the second server.
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><command>initialize</command></term>
    <listitem>
     <para>Initialize 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. <command>initialize-all</command> can also be used for this
     purpose.</para>
 
     <variablelist>
      <title>Subcommand Options</title>
 
      <para>
       In addition to global options, these subcommand options are supported.
      </para>
 
      <varlistentry>
       <term><option>-h, --hostSource {host}</option></term>
       <listitem>
        <para>
         Fully qualified host name or IP address of the source server whose contents
         will be used to initialize the destination server.
        </para>
 
        <para>
         Default value: <replaceable>configured-hostname</replaceable>
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>-p, --portSource {port}</option></term>
       <listitem>
        <para>
         Directory server administration port number of the source server whose
         contents will be used to initialize the destination server.
        </para>
 
        <para>
         Default value: <replaceable>configured-admin-port</replaceable>
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>-O, --hostDestination {host}</option></term>
       <listitem>
        <para>
         Fully qualified host name or IP address of the destination server whose
         contents will be initialized.
        </para>
 
        <para>
         Default value: <replaceable>configured-hostname</replaceable>
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--portDestination {port}</option></term>
       <listitem>
        <para>
         Directory server administration port number of the destination server whose
         contents will be initialized.
        </para>
 
        <para>
         Default value: <replaceable>configured-admin-port</replaceable>
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><command>initialize-all</command></term>
    <listitem>
     <para>Initialize 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 <command>initialize</command>
     for each server to achieve the same effect.</para>
 
     <variablelist>
      <title>Subcommand Options</title>
 
      <para>
       In addition to global options, these subcommand options are supported.
      </para>
 
      <varlistentry>
       <term><option>-h, --hostname {host}</option></term>
       <listitem>
        <para>
         Directory server hostname or IP address
        </para>
 
        <para>
         Default value: <replaceable>configured-hostname</replaceable>
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>-p, --port {port}</option></term>
       <listitem>
        <para>
         Directory server administration port number
        </para>
 
        <para>
         Default value: <replaceable>configured-admin-port</replaceable>
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><command>post-external-initialization</command></term>
    <listitem>
     <para>This subcommand must be called after initializing the contents of
     all the replicated servers using the <command>import-ldif</command>
     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
     <command>pre-external-initialization --help</command> for more
     information.</para>
 
     <variablelist>
      <title>Subcommand Options</title>
 
      <para>
       In addition to global options, these subcommand options are supported.
      </para>
 
      <varlistentry>
       <term><option>-h, --hostname {host}</option></term>
       <listitem>
        <para>
         Directory server hostname or IP address
        </para>
 
        <para>
         Default value: <replaceable>configured-hostname</replaceable>
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>-p, --port {port}</option></term>
       <listitem>
        <para>
         Directory server administration port number
        </para>
 
        <para>
         Default value: <replaceable>configured-admin-port</replaceable>
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><command>pre-external-initialization</command></term>
    <listitem>
     <para>This subcommand must be called before initializing the contents
     of all the replicated servers using the <command>import-ldif</command>
     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 <command>post-external-initialization</command>
     subcommand.</para>
 
     <variablelist>
      <title>Subcommand Options</title>
 
      <para>
       In addition to global options, these subcommand options are supported.
      </para>
 
      <varlistentry>
       <term><option>-h, --hostname {host}</option></term>
       <listitem>
        <para>
         Directory server hostname or IP address
        </para>
 
        <para>
         Default value: <replaceable>configured-hostname</replaceable>
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>-p, --port {port}</option></term>
       <listitem>
        <para>
         Directory server administration port number
        </para>
 
        <para>
         Default value: <replaceable>configured-admin-port</replaceable>
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><command>purge-historical</command></term>
    <listitem>
     <para>Launch 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.</para>
 
     <variablelist>
      <title>Subcommand Options</title>
 
      <para>
       In addition to global options, these subcommand options are supported.
      </para>
 
      <varlistentry>
       <term><option>-h, --hostname {host}</option></term>
       <listitem>
        <para>
         Directory server hostname or IP address
        </para>
 
        <para>
         Default value: <replaceable>configured-hostname</replaceable>
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>-p, --port {port}</option></term>
       <listitem>
        <para>
         Directory server administration port number
        </para>
 
        <para>
         Default value: <replaceable>configured-admin-port</replaceable>
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--maximumDuration {maximum duration}</option></term>
       <listitem>
        <para>
         This argument specifies the maximum duration the purge processing must last
         expressed in seconds.
        </para>
 
        <para>
         Default value: 3600
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>-t, --start {startTime}</option></term>
       <listitem>
        <para>
         Indicates the date/time at which this operation will start when scheduled
         as a server task expressed in YYYYMMDDhhmmssZ format for UTC time or
         YYYYMMDDhhmmss for local time.  A value of '0' will cause the task to be
         scheduled for immediate execution.  When this option is specified the
         operation will be scheduled to start at the specified time after which this
         utility will exit immediately.
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--recurringTask {schedulePattern}</option></term>
       <listitem>
        <para>
         Indicates the task is recurring and will be scheduled according to the
         value argument expressed in crontab(5) compatible time/date pattern
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--completionNotify {emailAddress}</option></term>
       <listitem>
        <para>
         Email address of a recipient to be notified when the task completes.  This
         option may be specified more than once.
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--errorNotify {emailAddress}</option></term>
       <listitem>
        <para>
         Email address of a recipient to be notified if an error occurs when this
         task executes.  This option may be specified more than once.
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--dependency {taskID}</option></term>
       <listitem>
        <para>
         ID of a task upon which this task depends.  A task will not start execution
         until all its dependencies have completed execution.
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>--failedDependencyAction {action}</option></term>
       <listitem>
        <para>
         Action this task will take should one if its dependent tasks fail.  The
         value must be one of PROCESS,CANCEL,DISABLE.  If not specified defaults to
         CANCEL.
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term><command>status</command></term>
    <listitem>
     <para>Display 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.</para>
 
     <variablelist>
      <title>Subcommand Options</title>
 
      <para>
       In addition to global options, these subcommand options are supported.
      </para>
 
      <varlistentry>
       <term><option>-h, --hostname {host}</option></term>
       <listitem>
        <para>
         Directory server hostname or IP address
        </para>
 
        <para>
         Default value: <replaceable>configured-hostname</replaceable>
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>-p, --port {port}</option></term>
       <listitem>
        <para>
         Directory server administration port number
        </para>
 
        <para>
         Default value: <replaceable>configured-admin-port</replaceable>
        </para>
       </listitem>
      </varlistentry>
 
      <varlistentry>
       <term><option>-s, --script-friendly</option></term>
       <listitem>
        <para>
         Use script-friendly mode.
        </para>
       </listitem>
      </varlistentry>
     </variablelist>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>
 <refsect1>
  <title>Examples</title>
  <para>The following example enables and then initializes replication
  for a new replica on <literal>opendj2.example.com</literal> from an existing
  replica on <literal>opendj.example.com</literal>.</para>
  
  <screen>$ 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.</screen>
 </refsect1>
</refentry>