Hi,
We're replacing our aging LDAP Cluster (Debian 7, slapd 2.4.40, 2 masters with syncrepl and mirror mode, 2 slaves) with a new cluster of the same layout (2.4.44, probably 2.4.46, on Debian 9). I now wonder what the best way is to transfer the data from the old to the new cluster. As far as I can see, we have three options to transfer the data:
1) ldapsearch + ldapadd 2) slapcat + slapadd 3) Configure a temporary syncrepl rule on the new masters to fetch the data from the old ones.
Which one is the preferred one? I would assume slapcat and slapadd, but I must admit I have not fully understood the purpose of the -S and -w switch. Should we somehow filter the *CSN-fields from the exported ldif as I assume they make no sense for the new cluster or are they automatically fixed when using slapadd with said options?
I'm sorry if this topic has been discussed here before but my (probably lacking) google skills did not return anything obvious.
Best regards Karsten
--On Tuesday, August 28, 2018 9:48 PM +0200 Karsten Heymann karsten.heymann@gmail.com wrote:
Which one is the preferred one? I would assume slapcat and slapadd, but I must admit I have not fully understood the purpose of the -S and -w switch. Should we somehow filter the *CSN-fields from the exported ldif as I assume they make no sense for the new cluster or are they automatically fixed when using slapadd with said options?
Indeed, slapcat + slapadd is the preferred route.
The CSN fields tie in to server ID. If your new cluster uses the same serverIDs as the old cluster, then you can just import the data as-is. If the new cluster has different serverIDs, then the procedure is:
a) slapcat existing database on the old cluster (while servers are offline *) b) slapadd (-q -S -w) to one of the new master servers while it is offline c) slapcat the new master server while it is offline so that you have a DB with correct SID values in the CSN fields. d) slapadd this second export to the rest of the new cluster
* http://www.openldap.org/its/index.cgi/?findid=8902
--Quanah
--
Quanah Gibson-Mount Product Architect Symas Corporation Packaged, certified, and supported LDAP solutions powered by OpenLDAP: http://www.symas.com
https://www.youtube.com/watch?v=8vQmTZTq7nw
Amazon Snowmobile On Tue, Aug 28, 2018 at 9:52 PM Karsten Heymann karsten.heymann@gmail.com wrote:
Hi,
We're replacing our aging LDAP Cluster (Debian 7, slapd 2.4.40, 2 masters with syncrepl and mirror mode, 2 slaves) with a new cluster of the same layout (2.4.44, probably 2.4.46, on Debian 9). I now wonder what the best way is to transfer the data from the old to the new cluster. As far as I can see, we have three options to transfer the data:
- ldapsearch + ldapadd
- slapcat + slapadd
- Configure a temporary syncrepl rule on the new masters to fetch the
data from the old ones.
Which one is the preferred one? I would assume slapcat and slapadd, but I must admit I have not fully understood the purpose of the -S and -w switch. Should we somehow filter the *CSN-fields from the exported ldif as I assume they make no sense for the new cluster or are they automatically fixed when using slapadd with said options?
I'm sorry if this topic has been discussed here before but my (probably lacking) google skills did not return anything obvious.
Best regards Karsten
openldap-technical@openldap.org