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

RE: backing up: slapcat vs. ldapsearch vs. db_checkpoint

Today at 8:27am, oclc ldap wrote:

> This is with reference to an earlier discussion
> http://www.openldap.org/lists/openldap-software/200402/msg00486.html
> I use ldapsearch to generate an ldif file with the following command
> ldapsearch -x -LLL -D "cn=admin1,dc=oclc,dc=org" -W
> -b "dc=oclc,dc=org" "(objectClass=*)" '*' '+' > output.ldif

> subschemaSubentry, hasSubordinates which are not present in the slapcat
> output. What is the best way of ignoring these?

The way I see it you have three choices:

1) upgrade to 2.x (x > 0), and use back-bdb so you can slapcat while
slapd is running.

2) instead of using '+', list out the extra attributes you want to see
and leave those two out -- this runs the risk that some other attribute
you really want will be added and you'll miss it.

3) instead of directly outputing the ldapsearch into the file, pipe it
through "egrep -vi '^subschemasubentry:|^hassubordinates:'" and then
into the file.

Frank Swasey                    | http://www.uvm.edu/~fcs
Systems Programmer              | Always remember: You are UNIQUE,
University of Vermont           |    just like everyone else.
        === God bless all inhabitants of your planet ===