HP-UX Directory Server Administrator Guide HP-UX Directory Server Version 8.1 (5900-3098, May 2013)

8.7 Configuring replication from the command line
Replication can be configured on the command line by creating the appropriate replica and
agreement entries on the servers. The process follows the same order as setting up replication
through the Directory Server Console:
1. Create the supplier bind DN on every consumer, hub, and multi-master supplier (“Creating
the supplier bind DN entry” (page 324)).
2. If the corresponding database and suffix do not exist on one of the replicas, create it (“Creating
suffixes” (page 31)).
3. Configure the supplier replicas (“Configuring suppliers from the command line” (page 363)).
4. Configure consumers (“Configuring consumers from the command line” (page 365)).
5. Configure hubs for cascading replication (“Configuring hubs from the command line” (page
366)).
6. Create the replication agreements (“Configuring replication agreements from the command
line” (page 367)). For cascading replication, create the agreement between the supplier and
hub, then between the hub and consumers; for multi-master, create the agreements between
all suppliers, then between the suppliers and consumers.
7. Lastly, initialize all the consumers (“Initializing consumers online from the command line (page
369)), if the consumers were not initialized when the replication agreement was created.
8.7.1 Configuring suppliers from the command line
There are two steps to setting up the supplier replica. First, the changelog must be enabled, which
allows the supplier to track changes to the Directory Server. Then, the supplier replica is created.
1. On the supplier server, use ldapmodify to create the changelog entry.
ldapmodify -D "cn=directory manager" -w secret -p 389 -h
supplier1.example.com -v
dn: cn=changelog5,cn=config
changetype: add
objectclass: top
objectclass: extensibleObject
cn: changelog5
nsslapd-changelogdir: /var/opt/dirsrv/slapd-instance_name/changelogdb
There is one important attribute with the changelog, nsslapd-changelogdir, which sets
the directory where the changelog is kept. The default changelog file location for HP-UX
Directory Server is /var/opt/dirsrv/slapd-instance_name/changelogdb.
The changelog entry attributes are described in Table 36 (page 364). These attributes are
described in more detail in the HP-UX Directory Server configuration, command, and file
reference.
2. Create the supplier replica.
ldapmodify -D "cn=directory manager" -w secret \
-p 389 -h supplier1.example.com -v
dn: cn=replica,cn="dc=example,dc=com",cn=mapping tree,cn=config
changetype: add
objectclass: top
objectclass: nsds5replica
objectclass: extensibleObject
cn: replica
nsds5replicaroot: dc=example,dc=com
nsds5replicaid: 7
nsds5replicatype: 3
nsds5flags: 1
8.7 Configuring replication from the command line 363