Hi Ludwing,
Glad to hear some things make sense, the doc says 10 min to wait until
in sync data, I can't afford wasting time if there are < 24 hours logs
to be applied to slave and users are connecting right away.
Bellow is my script, I done some changes as per Rich advise.
my OS :
Linux el6.x86_64 #1 SMP Thu Nov 21 13:35:52 CST 2013 x86_64 x86_64
x86_64 GNU/Linu
running from host2,
:scripts$ ./replicate_now.sh
./replicate_now.sh
+ SUP_HOST=host1.org.com
+ SUP_PORT=636
+ SUP_MGRPW=passwd
+ 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 proc5-01.cadc.dao.nrc.ca -p 636 -D 'cn=directory
manager' -w 04sirnea -b 'cn=mapping tree,cn=config'
*************************************************************************
Here is my script:
#!/bin/sh -x
SUP_HOST=host1.org.com
SUP_PORT=636
#SUP_MGRDN=cn=directory manager
SUP_MGRPW=passwd
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@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/389-users