[Date Prev][Date Next]
LDBM Database Backup Strategy
I work for a customer who wants to migrate his
user managment system from mysql to LDAP. The Database contains
~ 7000 entries right now. I converted the Database to LDIF and
was able to import it successfully using ldif2ldbm.
Currently I'm looking for a reliable way to keep LDIF backups
from the Database. I thought I could use
# ldbmcat -n id2entry.dbb > backup.ldif
to create an exact copy of the current ldbm database, which in turn
could be used as input to ldif2ldbm. But apparently I found out that
ldbmcat segfaults after the last entry. It turned out that ITS #211
was the culprit, the supplied patch fixed the problem.
Beeing able to actually use ldbmcat I found out that entries are
dumped in wrong order which makes it impossible to reimport the dump.
If I get the manpages right, the output from ldbmcat should be usable as
input to ldif2ldbm. Operation system / OpenLDAP version are
Linux 2.2.10 #2 SMP, openldap-1.2.6 and BerkeleyDB 2.7.5.
I also want to suggest to add another option to ldif2ldbm,
-t databasedir. We could then rebuild the database in a temporary
directory while slapd is running in read only mode.
Anyway, I'm interested in other backup strategies currently in
somewhere. Does someone use
# ldapsearch -L -D"rootdn" -w "rootpw" -b"basedn" -s sub 'objectclass=*'
This wouldn't require to shut down slapd but I'm not sure that there
aren't any implications (SIZE/TIMELIMIT, operational attributes, etc).
Is it reliable to backup just the *.dbb files ?
Lars Uffmann, <email@example.com>, fon +49 5241 80 1438