HP-UX Directory Server 8.1 administrator guide

Manual consumer initialization using the command line is a more effective method of initializing
a large number of consumers from a single LDIF file.
8.10.2 Online consumer initialization using the console
Online consumer initialization using the Console is the easiest way to initialize or reinitialize a
consumer. However, for replicating across a slow link, this process can be very time-consuming,
and manual consumer initialization using the command line may be a more efficient approach.
This is described in more detail “Manual consumer initialization using the command line”.
NOTE:
When a consumer server is being initialized using the online consumer creation method, all
operations (including searches) on the replica are referred to the supplier server until the
initialization process is completed.
To initialize or reinitialize a consumer online:
1. Create a replication agreement.
2. On the supplier server, on the Directory Server Console, select the Configuration tab.
3. Expand the Replication folder, then expand the replicated database. Right-click the
replication agreement, and choose Initialize Consumer from the pop-up menu.
A message opens warning that any information already stored in the replica on the consumer
will be removed.
4. Click Yes in the confirmation box.
Online consumer initialization begins immediately. To check the status of the online consumer
initialization, open the Summary tab in the Status box. If online consumer initialization is in
progress, the status shows that a replica is being initialized.
To update this window, right-click the replicated database icon in the navigation tree, and choose
Refresh Replication Agreements. When online consumer initialization finishes, the status
changes to reflect this.
For more information about monitoring replication and initialization status, see “Monitoring
replication status”.
8.10.3 Initializing consumers online using the command line
Online consumer initialization can be performed through the command line by adding the
nsds5BeginReplicaRefresh attribute to the replication agreement entry. This attribute is
absent by default, and it will be automatically deleted after the consumer initialization is complete.
1. Find the DN of the replication agreement on the supplier server that is for the consumer to
be initialized. For example:
ldapsearch -h supplier1.example.com -p 389 -D "cn=directory manager"
-w secret -s sub
-b cn=config "(objectclass=nsds5ReplicationAgreement)"
This command returns all the replication agreements configured on the supplier in LDIF
format. Get the DN of the replication agreement with the consumer to be initialized. This is
the replication agreement that will be edited.
2. Edit the replication agreement, and add the nsds5BeginReplicaRefresh attribute:
ldapmodify -D "cn=directory manager" -w secret -p 389 -h supplier1.example.com
dn: cn=ExampleAgreement,cn=replica,cn="dc=example,dc=com",cn=mapping tree,cn=config
changetype: modify
replace: nsds5beginreplicarefresh
nsds5beginreplicarefresh: start
374 Managing replication