[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: slapcat backup inconsitency - several tries gives different output results

--On Monday, February 20, 2006 6:04 PM +0000 ricardo.ferreira@cimsoft.pt wrote:


I'm having this huge problem that I can't resolve.
I'm using slapcat to backup my ldap and I'm sending it to a file.
I use that file to restore my ldap using slapadd

I have a program that counts all the nodes in ldap and gives me this

Try#1: original ldap: 592 nodes -> restored ldap: 574 nodes
Try#2: original ldap: 615 nodes -> restored ldap: 592 nodes
Try#3: original ldap: 605 nodes -> restored ldap: 602 nodes
Try#4: original ldap: 582 nodes -> restored ldap: 550 nodes

These tries were all different. I don't have a clue what is happening.

What version of OpenLDAP? What database backend are you using? Is the server stopped when you slapcat? Is the server stopped when you slapadd?

Have you tried doing a slapcat, then a slapadd, and then a slapcat, and doing a diff of the files to see if perhaps your program has a counting problem?

It would be very simple to test this:

slapcat your db
grep ^dn: <LDIF FILE> | wc -l

slapadd your db

slapcat your db

grep ^dn: <LDIF FILE> | wc -l

If those numbers match, then everything worked correctly. I've been using slapcat/slapadd for years, and not had nodes disappear so far....


Quanah Gibson-Mount
Principal Software Developer
ITS/Shared Application Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html