Archives for : January2014

Line break problem with slapcat and LDIF on Debian Lenny

There’s a problem with the slapcat dump on Debian Lenny (I don’t know about newer versions of Debian) : characters after the 80th column goes to a new line, causing errors in slapadd during a restore .

For exemple :

[...]nal-domain,dc=
 fr
modifyTimestamp: 20100928100440Z

 

In fact, it’s not a problem, but a ‘design’ of the LDAP LDIF RFC (RFC 2849).

Here is a workaround (you have to redo a backup of course), but you can do it in any other scripting language:

slapcat .... | perl -0pe 's/\n //g'> backup.ldif

 

ref : http://www.openldap.org/lists/openldap-technical/201007/msg00236.htm