Re: replicate_now script help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
On 11/13/2014 05:57 PM, ghiureai wrote:

 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'
did you edit the output of the script ? the listing of the variables and the use in ldapsearch doesn't match eg host1.org.com <> proc5-01.cadc.dao.nrc.ca

and in the script itself, is it a copy and paste issue or do you have the continuation char '\' at the new line instead of at the end of the line to be continued, the +ldapsearch output seems truncated

*************************************************************************
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





[Index of Archives]     [Fedora User Discussion]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora News]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora QA]     [Fedora Triage]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Yosemite Photos]     [Linux Apps]     [Maemo Users]     [Gnome Users]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Maemo Users]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Fedora ARM]

  Powered by Linux