Hi All,
I just successfully replicated Openldap using ubuntu 10.04 as master server (provider), 12.04 as slave server (consumer).
I'm using syncrepl method for this replication.
Below configuration for provider.ldif and customer.ldif
*### provider ### # Add indexes to the frontend db. dn: olcDatabase={1}hdb,cn=config changetype: modify add: olcDbIndex olcDbIndex: entryCSN eq - add: olcDbIndex olcDbIndex: entryUUID eq
#Load the syncprov and accesslog modules. dn: cn=module{0},cn=config changetype: modify add: olcModuleLoad olcModuleLoad: syncprov - add: olcModuleLoad olcModuleLoad: accesslog
# Accesslog database definitions dn: olcDatabase={2}hdb,cn=config objectClass: olcDatabaseConfig objectClass: olcHdbConfig olcDatabase: {2}hdb olcDbDirectory: /var/lib/ldap/accesslog olcSuffix: cn=accesslog olcRootDN: cn=admin,dc=teleneos,dc=org olcDbIndex: default eq olcDbIndex: entryCSN,objectClass,reqEnd,reqResult,reqStart
# Accesslog db syncprov. dn: olcOverlay=syncprov,olcDatabase={2}hdb,cn=config changetype: add objectClass: olcOverlayConfig objectClass: olcSyncProvConfig olcOverlay: syncprov olcSpNoPresent: TRUE olcSpReloadHint: TRUE
# syncrepl Provider for primary db dn: olcOverlay=syncprov,olcDatabase={1}hdb,cn=config changetype: add objectClass: olcOverlayConfig objectClass: olcSyncProvConfig olcOverlay: syncprov olcSpNoPresent: TRUE
# accesslog overlay definitions for primary db dn: olcOverlay=accesslog,olcDatabase={1}hdb,cn=config objectClass: olcOverlayConfig objectClass: olcAccessLogConfig olcOverlay: accesslog olcAccessLogDB: cn=accesslog olcAccessLogOps: writes olcAccessLogSuccess: TRUE # scan the accesslog DB every day, and purge entries older than 7 days olcAccessLogPurge: 07+00:00 01+00:00*
Then below consumer.ldif * ### consumer ### #Load the syncprov module. dn: cn=module{0},cn=config changetype: modify add: olcModuleLoad olcModuleLoad: syncprov
# syncrepl specific indices dn: olcDatabase={1}hdb,cn=config changetype: modify add: olcDbIndex olcDbIndex: entryUUID eq - add: olcSyncRepl olcSyncRepl: rid=0 provider=ldap://139.193.195.170 bindmethod=simple binddn="cn=admin,dc=teleneos,dc=org" credentials=teleneos searchbase="dc=teleneos,dc=org" logbase="cn=accesslog" logfilter="(&(objectClass=auditWriteObject)(reqResult=0))" schemachecking=on type=refreshAndPersist retry="60 +" syncdata=accesslog - add: olcUpdateRef olcUpdateRef: ldap://139.193.195.170*
Now when i add any value on ldap provider, They will replicated on consumer (ldap slave server).
But on my mechanism, i will have many ldap master machine on internet which will have to replicated to one ldap slave server.I will created centralized system. Moreover every ldap server is using dynamic Ip address which should change automatically.
So not possible for me if i must add line* olcUpdateRef: ldap://ip_provider*for every ldap provider on ldap configuration.
Is there configuration on ldap provider to pointing where ldap slave is ? So that, to replicate to slave server on my provider server (ldap master) , i just need pointing ip of slave ldap server is.
So configuration pointing on every ldap provider.
Help me to solve this issue.
Thanks