Chapter 8. Managing Replication

11.1. Forcing Replication Updates from the Console

To ensure that replication updates are sent immediately when a consumer or a supplier in a multi-master replication configuration comes back online after a period of time, do the following on the supplier server that holds the most recent version of the directory information:

1.In the Directory Server Console, click the Configuration tab, expand the Replication folder and database nodes, and select the replication agreement corresponding to the replica to update.

2.Right click the replication agreement, and choose Send Updates Now from the drop-down list.

This initiates replication toward the server that holds the information that needs to be updated.

11.2. Forcing Replication Updates from the Command-Line

From the consumer that requires updating, run a script that prompts the supplier to send replication updates immediately. This script is shown in Example 8.1, “Replicate_Now Script Example”.

Copy this example script and name it something like replicate_now.sh. Substitute the actual values for the variables listed in Example 8.1, “Replicate_Now Script Example”.

NOTE

This script must be run manually since it cannot be configured to run automatically as soon as the server, which was offline, comes back online again.

#!/bin/sh

SUP_HOST=supplier_hostname

SUP_PORT=supplier_portnumber

SUP_MGRDN=supplier_directoryManager

SUP_MGRPW=supplier_directoryManager_password

MY_HOST=consumer_hostname

MY_PORT=consumer_portnumber

ldapsearch -1 -T -h ${SUP_HOST} -p ${SUP_PORT} -D "${SUP_MGRDN}" \ -w ${SUP_MGRPW} -b "cn=mapping tree, cn=config"

\"(&(objectclass=nsds5replicationagreement)(nsDS5ReplicaHost=${MY_HOST}) \(nsDS5ReplicaPort=${MY_PORT}))" dn nsds5ReplicaUpdateSchedule >

/tmp/$$

cat /tmp/$$ awk 'BEGIN { s = 0 }/^dn: / { print $0;print "changetype: modify";print

"replace: nsds5ReplicaUpdateSchedule";print "nsds5ReplicaUpdateSchedule: 0000-2359

0123456";print "-";print "";print $0;print "changetype: modify";

330

Page 350
Image 350
HP UX Red Hat Direry Server Software manual Forcing Replication Updates from the Console