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

Re: ldbmcat Question



Tony Earnshaw wrote:
> 
> tir, 2002-10-29 kl. 21:55 skrev Tod Thomas:
> 
> > My directory info. comes from a number of sources including flat files
> > and dynamic user updates.  For disaster recovery I want to be able to
> > recover the directory contents by using a combination of file input, and
> > sections of the nightly ldbmcat dump.  The file input is no problem, but
> > the dynamic content is if I can't specifically dump sections of the
> > DIT.  If that's not possible I'll have to selectively parse out the full
> > LDIF which might get messy.  Any ideas?
> 
> There must be, since GQ can do it.

GQ?
 
> So, if one compares GQ's LDIF output on a given "branch" as an Admin
> bind DN, with a command line ldapsearch as an Admin bind on the same
> "branch," one sees that they both produce an LDIF file with essentially
> the same format.
> 
>  ldapsearch -x -D "cn=Admin,dc=billy,dc=demon,dc=nl" \
>  -b "ou=groups,dc=billy,dc=demon,dc=nl" '(objectClass=*)' -w password \
>  > /tmp/groups.ldif

You're right.  Thanks for waking me up, my brain was sleeping.  Throw in
-F': ' and it looks almost exactly like the ldif format.
 
> I use Openldap 2.1.8, so if I say that both differ from an slapcat in
> that they don't contain all the Creator, Modifier and Timestamp stuff
> that slapcat produces, I hope you understand that. You don't say what
> version you're using.

Old version of Netscape's, I'll just filter those attribs on the way
out.

Thanks for your help.