Hi,
Any ideas how to migrate database from back-bdb to other backend (for example mdb), while using cn=config? When using slapd.conf - flat config file - it seems to be simple task. But how to do it using cn=config? For sure it is not online operation, and any offline modifications to LDIF config files are not recommended.
Regards, — Olo
Hi,
On Tue, 4 Feb 2014, Aleksander Dzier?anowski wrote:
Hi,
Any ideas how to migrate database from back-bdb to other backend (for example mdb), while using cn=config? When using slapd.conf - flat config file - it seems to be simple task. But how to do it using cn=config? For sure it is not online operation, and any offline modifications to LDIF config files are not recommended.
use slapcat to dump your cn=config in database 0
slapcat -n0 -F path/slapd.d -l config.ldif
edit config.ldif and reimport
mv slapd.d slapd.d.old mkdir slapd.d slapcat -n0 -F path/slapd.d -l config.ldif
I like to use "-o ldif-wrap=no" with slapcat to enable easier diff of config dumps.
Greetings Christian
Regards, ? Olo
Aleksander Dzierzanowskiolo@e-lista.pl schrieb am 04.02.2014 um 07:33 in
Nachricht 8F5CF25D-A168-4366-AA41-031E4927943C@e-lista.pl:
Hi,
Any ideas how to migrate database from back-bdb to other backend (for example mdb), while using cn=config? When using slapd.conf - flat config file - it seems to be simple task. But how to do it using cn=config? For sure it is not online operation, and any offline modifications to LDIF config files are not recommended.
My sponaneous idea would be to rename the old database (via cn=config), then add a new database (via cn=config), then shutdown slapd, export the old database, modify the LDIF, then import the new database. slapd should start fine. Now if you are satisfied, drop the old database (via cn=config), and you should be done.
I never tried that, but it sounds like a promising procedure...
Regards, — Olo
Am Tue, 4 Feb 2014 07:33:31 +0100 schrieb Aleksander Dzierżanowski olo@e-lista.pl:
Hi,
Any ideas how to migrate database from back-bdb to other backend (for example mdb), while using cn=config? When using slapd.conf - flat config file - it seems to be simple task. But how to do it using cn=config? For sure it is not online operation, and any offline modifications to LDIF config files are not recommended.
Create a minimal slapd.conf with a database mdb configuration with a different directory path. slacat the bdb database, slapadd -f path/to/minimal/slapd.conf -l ldif file
ldapmodify dn: olcDatabase={1}hdb,cn=config changetype: modify replace: olcDatabase olcDatabase: {1}mdb - replace: olcDbDirectory olcDbDirectory: /path/to/newDB
Instead of slapcat and a minimal slapd.conf you may dump the database by ldapsearch, modify the config database as above and ldapadd the dumped file.
-Dieter
openldap-technical@openldap.org