On 11/13/2014 08:36 AM, ghiureai wrote:



Morning Rich,

Please, see my full script, I'm runing this script from host2 , in a multimaster replication env: host1 <---> host2 (How are the DS users sync data in multimaster if they will not use this scripts and not have access to admin console?)

I'm not sure what you are asking here. I'm also not sure why you are trying to use the replicate_now script. Replication is supposed to "just work" - as soon as a change is received, it should be sent immediately to all of its replicas.

#!/bin/sh -x
SUP_HOST=host1.org.com
SUP_PORT=636
#SUP_MGRDN=cn=directory manager
SUP_MGRPW=mypasswd
MY_HOST=host2.org.com
MY_PORT=636
export SUP_HOST SUP_PORT SUP_MGRDN SUP_MGRPW MY_HOST MY_PORT

ldapsearch -x -LLL -h ${SUP_HOST} -p ${SUP_PORT} -D "cn=directory manager" \
     -w ${SUP_MGRPW} -b "cn=mapping tree,cn=config"
\"(&(objectclass=nsds5replicationagreement)(nsDS5ReplicaHost=${MY_HOST})
\(nsDS5ReplicaPort=${MY_PORT}))" dn nsds5ReplicaUpdateSchedule |perl -p0e 's/\n //g' > /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";
     print "replace:nsds5ReplicaUpdateSchedule";}

/^nsds5ReplicaUpdateSchedule: / { s = 1; print $0; }/^$/{if ( $s == 1 ){ print "-" ; print ""; }else{ print "nsds5ReplicaUpdateSchedule: 0000-2359 0123456";print "-" ;
     print ""; };s = 0; }

' > /tmp/ldif.$$echo "Ldif is in /tmp/ldif.$$"echo

ldapmodify -x -c -h ${SUP_HOST} -p ${SUP_PORT} -D "${SUP_MGRDN}" \-w ${SUP_MGRPW}
     -f /tmp/ldif.$$


On 11/12/2014 09:54 AM, ghiureai wrote:
Hi LIst,
I'm new to 389-ds admin , I have cfg a multimaster replication system , and read the RHES -DS documentation find the replicate_now script which is suppose to trigger master rep updates < 10 min, the script fails , there is no option for -1 in ldapsearch ...etc Wodner if any of you have an update script , I 'm running 389-ds on CentoS 6.5 .

Thank you
Isabella



--
389 users mailing list
389-users@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/389-users

Reply via email to