[Date Prev][Date Next]
RE: openldap backup procedures?
My 2 cents....
For backup, is it not sufficient to back up the files in
/usr/local/var/openldap-ldbm/ (or wherever) ??
For export and import, using 2.x, I've been using slapcat, removing *.dbb
from /usr/local/var/openldap-ldbm/, and slapadd. This seems to work,
although I HAVE been experiencing some weirdness (probably my own doing)
> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org
> [mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Randy Kunkee
> Sent: Tuesday, November 14, 2000 11:04 PM
> To: Adam Haberlach
> Cc: openldap-software@OpenLDAP.org
> Subject: Re: openldap backup procedures?
> > I'm looking to dump my LDAP directory, both for backup and
> > migration. However, when I try to dump:
> > /usr/local/sbin/ldbmcat -n /usr/local/data/slapd/id2entry.dbb
> > ...and then restore...
> > cat dump.ldif | ldapadd -w foobar -D "cn=Manager, dc=ge, dc=com"
> > I get things like:
> > adding new entry nxx=515, npa=580, st=OK, co=USA,
> > dc=mabell-20000912-175552, cn=Manager, dc=ge, dc=com
> > ldap_add: No such object
> > I'm assuming that the dump needs to have things in order to preserve the
> > heirarchy of my data, but isn't. Any idea how I can dump data in a way
> > that is portable and can be stored and restored?
> Since you describe using ldbmcat, you must be using version 1.2.x.
> However, an analogous answer probably applies to 2.x.
> ldbmcat generates an ldif file in database order -- ie. no particular
> order. This means that branches and leaves are often written before
> their parents, which is intolerable to ldapadd.
> You must use ldif2ldbm to reload a file dumped by ldbmcat. This also
> has the advantage that createtimestamp and modifytimestamp will be
> preserved. It has the disadvantage that minimal checking is performed
> during the reload.