If you include '-o ldif_wrap=no' that should prevent the line wrapping and will 
make the subsequent regex replace straightforward to do with tools such as sed. 
 Check out the man page for slapcat if you need more detail.

Best,
Aaron

-----Original Message-----
From: Jean-Luc Chandezon <j...@lan-explore.fr> 
Sent: Friday, June 16, 2023 10:19 AM
To: openldap-technical@openldap.org
Subject: Data migration


Warning: This email is from outside the company. Be careful clicking links or 
attachments.

Hello dear community,

I have to migrate our ldap database from OpenLDAP (from 2019 version hosted on 
Debian, to Symas OpenLDAP 2.4.59 on ).
I need to change our DN from "dc=lexp,dc=fr" to 
"dc=directory,dc=lan-explore,dc=fr".

I installed OpenLDAP and configure directory with new DN.

For data migration, I exported data:
slapcat -b dc=lexp,dc=fr > /tmp/20230616_save_data.ldif

.. and for recovery, I changed all dn mentions from old to new dn.

1. Is the correct way?
When import, you can see error message: slapadd: slap_init invalid suffix 
("dc=directory,dc=lan-explore,dc=fr ") 2. When searching, I discovered that 
each line can contains 77 columns. Next, line is truncated, and it's difficult 
to replace all dn.

Thanks,

Jean-Luc

----------------------------------------------------------------------
The information contained in this message may be privileged, confidential and 
protected from disclosure. If the reader of this message is not the intended 
recipient, or an employee or agent responsible for delivering this message to 
the intended recipient, you are hereby notified that any dissemination, 
distribution or copying of this communication is strictly prohibited. If you 
have received this communication in error, please notify your representative 
immediately and delete this message from your computer. Thank you.

Reply via email to