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

Re: slapcat -n 0 and slapadd



On Oct 26, 2011, at 12:00 PM, Howard Chu wrote:

> Craig White wrote:
>> Having migrated to dynamic config, I'm looking for a reasonable way to
>> restore in the event of a disaster.
>> 
>> The discussion last week got me curious and though I can slapcat -n 0 -l
>> $SOME_FILE I can't slapadd this same file because it complains that I don't
>> have a slapd.conf file, which of course is true... I haven't needed it with
>> the dynamic configuration backend.
>> 
>> What's the minimum that I would need in a slapd.conf file so I can simply
>> 'rm -fr /var/lib/ldap/*&&  slapadd -l $SLAPD_BACKUP' ?
> 
> You don't need a slapd.conf file at all. You just need to tell it where to slapadd the configuration.
> 
> slapadd -F new/slapd.d -n0 config.ldif
----
# mkdir /etc/ldap/slapd.d

# slapadd -l slapcat_config.ldif -F /etc/ldap/slapd.d
Available database(s) do not allow slapadd

There aren't any databases configured because I'm thinking recovery from a disaster, starting from a clean install as it were.

Craig