HP-UX Directory Server 8.1 administrator guide
NOTE:
After creating a replication agreement, the connection type (SSL or non-SSL) cannot be change
because LDAP and LDAPS connections use different ports. To change the connection type,
re-create the replication agreement.
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”).
2. If the corresponding database and suffix do not exist on one of the replicas, create it (“Creating
suffixes”).
3. Configure the supplier replicas (“Configuring suppliers from the command line”).
4. Configure consumers (“Configuring consumers from the command line”).
5. Configure hubs for cascading replication (“Configuring hubs from the command line”).
6. Create the replication agreements (“Configuring replication agreements from the command
line”). 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”),
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 8-1 “Changelog attributes”. 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
364 Managing replication