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

Re: Converting from slapd.d back to slapd.conf




On Thu, 27 Mar 2014, Christian Kratzer wrote:
Hi,

On Thu, 27 Mar 2014, Sven Jourgensen wrote:
> Is there a tool to perform the reverse operation, and convert the newer
> cn=config configuration back into a slapd.conf?

no. This is currenty a one way street and is expected to stay that way.

Is there any special reason you would like to have this ?
On 03/27/14 09:11 -0500, Sven Jourgensen wrote:
Yes, we've been using the cn=config method since we upgraded our machines
a year or two back, and it's created problems that we didn't have with a
single flat config file. We don't need the ability to change config on the
fly, so we're going to convert back.

I have my generic slapd.conf for our machines but I'd like to compare it.

Sounds like a job for diff:

slapcap -n0 -F <path_to_existing_slapd.d> > $TMP/slapd-portable.ldif

mkdir $TMP/slapd.d.generic
slaptest -f <path_to>/slapd.conf.generic -F $TMP/slapd.d.generic
slapcat -n0 -F $TMP/slapd.conf.generic > $TMP/generic-portable.ldif

diff -ruN $TMP/slapd-portable.ldif $TMP/generic-portable.ldif

Compare the output, and adjust your generic slapd.conf, then rinse, lather,
and repeat until you get the same output.

--
Dan White