[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: changing database backend



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

-- 
Dieter KlÃnter | Systemberatung
http://dkluenter.de
GPG Key ID: E9ED159B
53Â37'09,95"N
10Â08'02,42"E