reagarding importing
We Have around 2000 DS Servers each with around 500 entries...Now we are planning to have a central LDAP which has all the entries from the 2000 Servers.....Each Server has a number assigned to it and this value is maintained under the attribute "xyxnumber"
All the entries from the 2000 Servers will be maintained under a single OU in the Central LDAP....We are importing through the LDIF files....
The Problem i have is ....We have certain entries which are present in multiple Servers...SO when we import these entries into the Central LDAP.,,There is chance that these entries might be rejected while importing because of duplicate entry......
The thing is that ...These kind of entries will be having a different value for the above said attribute...SO can we have import operation in such a way that.....if the entry is present in the DS,only the "xyxnumber" attribute with the new value is added to this entry as this attribute is a multivalued attribute....So that we can know the Servers in which the entry exists.....Any help would be appreciated...
regards
# 1
Hi,
I think you are asking the Directory Server too much, ie to do data cleaning and apply business logics that are not LDAP specific.
When doing an Import, Directory Server will either accept the entry as is (if the DN is not already in the database) or reject it.
You could merge all your data into a single LDIF file. Import it with -c (Continue on error). And then process the Rejected file to identify the entries that have been rejected and for which you want to do a special treatment.
For example, you may want to turn the rejected file into a set of Modifications to apply to the loaded data.
Regards,
Ludovic
# 2
Hi ludovcip,
you are absolutely right...I was expecting too much....Anyway i had the same idea as u suggested......but i have a question for the exporting operation:
Can i pass on the values for the options -h,-p,-b during the export operation from a file,as we will be exporting the ldif file by using "ldapsearch" command
# 3
Export usually means using db2ldif or db2ldif.pl.
The latest is an online export. By looking into the script you can see how to export your database to LDIF remotely (with -h, -p ... options).
Getting the data using ldapsearch is a little bit different from an export as the operational attributes will not be returned unless specifically asked. However, if you are only interested in certain attributes and objects, this method is likely to be faster (and will produce smaller data sets).
Regards
Ludovic.
# 4
ludovcip,
Now i got to know the clear difference...This point raises a doubt....
As you know that we have 2000 Individual Servers and we are planning to have a Central LDAP which has user entries from all these 2000 Servers.....So what would you prefer to get the data from these 2000 Servers.... db2ldif or ldapsearch...because we require all the user entries and my tests with ldapsearch has almost met what we wanted
So what is the best practise to do?Also we are planning to have a script that exports the ldif file.....FTP it on to the Central LDAP and Import the file.......so that we can run this script at a time for mutiple Servers...So My question is.....can we pass on the values for the options -h, -p, -b from a file into the ldapsearch command.
We will prepare a file that lists out all the -h,-p,-b option s of all 2000 Servers...we are planning to run this script on 50 Servers at each time...All the Servers have common binding id's...
Also they are asking me to prepare a script or java program in such a way that......while importing if an entry already exists in the Central LDAP..then the entriy's attributes in the Central LDAP and attirbutes in the export file should be compared and only attribute that is not present in the central LDAP(or else an attribute that has a different value in the export fiile when compared to the value present in the Central LDAP) should be added to the entry ...
I have already suggested them that this might be too complicated script and instead i gave them the option you suggested yesterday in this post.....So I just would like to know from you the possibility of having this kind of java program or script....because i dont know much of programming (JAVA)..
I still feel Modifying the rejected ldif file and adding it through ldapmodify is the best method for this problem and also a easier way of doing this..so that we can make sure that all the entries are being imported into the Central LDAP... .I apologise for posting such a long posts..............because am new to this kind of huge Setup ...So am just trying to get your views.....
Regards