Scott Classen wrote:
Hello openldap community,
I have openldap 2.4.6 running on 2 machines.
one master server with a BDB database acting as the syncrepl
provider (the
syncrep[l overlay has been added to the database configuration
directive).>
I now have set up a second machine also running openldap 2.4.6
and I've
been
playing around with it trying to get it to act as a syncrepl consumer.
I remember reading somewhere in the openldap documentation that
it should
be
fairly straight forward with a simple 10-12 line LDIF file to get
the synrepl
consumer synched up with the provider.
Can someone please post an example of such a simple kickstart file?
Thanks ^6,
Sounds vaguely like you want this
(from <A HREF="http://www.openldap.org/pub/hyc/LDAPcon2007s.pdf" target="l">http://www.openldap.org/pub/hyc/LDAPcon2007s.pdf</A> page 20)
###
dn: cn=config
objectclass: olcglobal
cn: config
dn: olcdatabase={0}config,cn=config
objectclass: olcdatabaseconfig
olcdatabase: {0}config
olcsyncrepl: rid=001 provider=$URI binddn="cn=config"
bindmethod=simple credentials=$CONFIGPW searchbase="cn=config"
type=refreshOnly interval=00:00:00:10
###
Slapadding this will fully initialize a new server if you point it
at an
existing provider, but of course you need to have the syncprov
overlay
configured on the config database of the provider.
See test049 in the test suite for a more detailed example.
Yes, that is what I am interested in.
I added the syncprov overlay to the cn=config directive on the PROVIDER as such:
cn=config
olcDatabase={0}config
olcOverlay={0}syncprov
Now on a brand new CONSUMER machine I created the following LDIF file (sync-seed.ldif):
dn: cn=config
objectClass: olcGlobal
cn: config
dn: olcDatabase={0}config,cn=config
objectClass: olcDatabaseConfig
olcDatabase: {0}config
olcRootDN: cn=ldapadmin,cn=config
olcRootPW: {SSHA}mysoopersecretpasswd
olcsyncrepl: rid=001 provider=ldap://my.provider.machine binddn="cn=ldapadmin,cn=config" bindmethod=simple
credentials=secret searchbase="cn=config" type=refreshOnly
interval=00:00:00:10
I then put the file in my openldap dir and cd there:
cd /usr/local/etc/openldap
mkdir slapd.d
slapadd -b "cn=config" -F slapd.d -l sync-seed.ldif
all is OK
I then start slapd:
/usr/sbin/slapd -d 256
...
slapd starting
syncrepl_message_to_entry: rid=001 mods check (olcDbConfig: value #6 provided more than once)
do_syncrepl: rid=001 quitting
Hmmm what have I done wrong?
Thanks,
Scott