I would backup the database from the old server and restore it to the new one.
Old Server
{PATH}openldap/sbin/slapcat -n 0 – {PATH}/openldap/etc/openldap/slapd.d -l {PATH}/slapd.d.ldif
{PATH}openldap/sbin/slapcat -b {BASE DN} -F {PATH}/openldap/etc/openldap/slapd.d -l {PATH}/config.ldif
Copy ldif
New Server
mkdir {PATH}l/openldap/etc/openldap/slapd.d
{PATH}openldap/sbin/slapadd -b {BASE_DN} -F {PATH}/openldap/etc/openldap/slapd.d -l {PATH}/config.ldif
{PATH}openldap/sbin/slapadd -n 0 -F {PATH}/openldap/etc/openldap/slapd.d -l {PATH}/slapd.d.ldif
From: xpzhang1971@gmail.com <xpzhang1971@gmail.com>
Sent: Friday, March 22, 2024 6:41 PM
To: openldap-technical@openldap.org
Subject: [EXTERNAL] how to migrate an openldap server to a new linux server
I have an openldap server I want to clone it to another linux server. However, I can't access it by login but can just run ldapsearch because this source openldap
server only open port 389. Now I installed openldap-servers package to target
I have an openldap server I want to clone it to another linux server. However, I can't access it by login but can just run ldapsearch because this source openldap server only open port 389.
Now I installed openldap-servers package to target linux server, then what? I appreciate if anybody can instruct me or direct me to useful documents.