2013/1/24 Hallvard Breien Furuseth <h.b.furuseth@usit.uio.no>:
Meike Stone writes:
- What ist the origin for such orphaned nodes (In MMR, it happens and
I see a few glue records, but in my backup this one node is complete
missing...)?
Do you check the exit code from slapcat before saving its output?
If slapcat (well, any program) fails, discard the output file.
Hello,
yes, every time I make a Backup, the exitcode from slapcat is evaluated.
If any error occur, I write a message in syslog.
I searched in syslog over one year, but no error occured.
Espechially the date, where the backup was created, what I use now for tests.
So I tried it again:
Load broken DB via slapadd in slapd (messages proof that it is broken):
-------------------------------------------------------------------------------------------------------
debld02:~ # slapadd -f /etc/openldap/slapd.conf -q -l /backup.ldif
_#################### 100.00% eta none elapsed 19m11s spd 2.2 M/s
Closing DB...Error, entries missing!
entry 1156449: ou=a,ou=b,ou=c,ou=root
Check, that the "parent entry" not exist:
---------------------------------------------------------
~ # ldapdelete -x -h localhost -w password -D cn=admin,ou=root
"cn=cname,ou=a,ou=b,ou=c,ou=root"
ldap_delete: Other (e.g., implementation specific) error (80)
additional info: could not locate parent of entry
~ # echo $?
80
Try to check exit code from slapcat after backup the broken DB:
---------------------------------------------------------------------------------------------
~ # slapcat -f /etc/openldap/slapd.conf >/backup.ldif; echo $?
0
It seems to me, that in such case, the slapcat does not trows an error?!