I'm trying to export LDAP data from a Zimbra schema into a basic OpenLDAP schema. Obviously the Zimbra schema has much more attributes than the basic OpenLDAP. My question is if there is a way of:
- Either export the LDAP data filtering only attributes present on the basic OpenLDAP schema
- Or having a full export of the LDAP data with Zimbra attributes, somehow import only the valid attributes
- Or if there is a tool to modify the LDIF file to remove the attributes not present in the basic OpenLDAP schema
The LDAP has a few hundred of nodes, so I was looking for a way to make this at least semi-automatically
First, it should be possible to add the Zimbra specific schema to any LDAP server and just import the LDIF file in the usual way.
Second, you can use the
-c
switch ofldapadd
to continue operations in case of errors (and the-S
switch to log this stuff). Obviously, you need to test if you still have a usable structure when doing this.Third, if you need only a subset of fields, you can dump only the attributes you are interested when using
ldapsearch
.See the respective man pages.