There are 6,000,000 records in my openldap directory, I want to backup the data, but I found that the slapcat isn't work when the file id2entry.dbbsize over 2G, so I export the data by ldapsearch, but after I use slapadd to import the data to the backup server, there are some strange error happened, some records can't be add to the ldap correctly, and the record coundn't be searched by ldapsearch. As the same time, others data can be correctly operated.
Operation system is the redhat linux 9.0. The verson of openldap is 2.0.27, use ldbm. Because there are too many records so I couldn't upgrade the version of the openldap .
when I use ldapsearch the result is : # # filter: (&(uid=abc)(domain=123)) # requesting: ALL #
# search result search: 2 result: 0 Success
when i use ldapadd to add the record, it says:
ldap_add: Already exists ldif_record() = 68
when i use ldapdelete to del it, the result is:
Delete Result: Invalid DN syntax (34) Additional info: invalid DN (my dn is right)
I thought mybe the record format is not correct that I exported by ldapsearch and imported by slapadd, because the ldif file lost entryUUID、entryCSN... and so on.
now how can i do? I have tried to rebuild the entryUUID and run the slapindex to rebuild the index, but failed at least.
--On Wednesday, March 05, 2008 7:49 PM +0800 何萍 cress.hp@gmail.com wrote:
There are 6,000,000 records in my openldap directory, I want to backup the data, but I found that the slapcat isn't work when the file id2entry.dbb size over 2G, so I export the data by ldapsearch, but after I use slapadd to import the data to the backup server, there are some strange error happened, some records can't be add to the ldap correctly, and the record coundn't be searched by ldapsearch. As the same time, others data can be correctly operated.
Operation system is the redhat linux 9.0. The verson of openldap is 2.0.27, use ldbm. Because there are too many records so I couldn't upgrade the version of the openldap . I thought mybe the record format is not correct that I exported by ldapsearch and imported by slapadd, because the ldif file lost entryUUID、entryCSN... and so on.
Do an ldapsearch across the entire tree, dumping the database to a file. I personally wouldn't worry much about the operational attributes as they've changed format over the years between 2.0 and the current 2.4. If you really want them, do a * + search so you get operational as well. Once you have the ldif file, set up a *second server* and test adding the entries to it.
--Quanah
--
Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc -------------------- Zimbra :: the leader in open source messaging and collaboration
openldap-technical@openldap.org