Dear list!
If I have an LDIF backup of a cn=config database, taken with slapcat, how would I use it to bootstrap a new server, for example, in a desaster recovery setting?
I tried it and slapadd required a configuration, but cn=config *is* the configuration and I am trying to restore it. So this is a bit of a chicken and egg problem, isn't it?
Is there an "official" way of doing that?
Regards, Torsten
Torsten Schlabach (Tascel eG) wrote:
Dear list!
If I have an LDIF backup of a cn=config database, taken with slapcat, how would I use it to bootstrap a new server, for example, in a desaster recovery setting?
I tried it and slapadd required a configuration, but cn=config *is* the configuration and I am trying to restore it. So this is a bit of a chicken and egg problem, isn't it?
It looked that way, when we started designing this 4 years ago. But yes, we have a solution.
Is there an "official" way of doing that?
Exactly the same way as you slapcat'd it. What was the exact command line you used for slapcat?
Hi Howard!
Exactly the same way as you slapcat'd it.
I don't actually understand ... ??
What was the exact command line you used for slapcat?
slapcat -b 'cn=config'
(IIRC)
Regards, Torsten
On Tue, 21 Sep 2010 03:50:34 -0700, Howard Chu hyc@symas.com wrote:
Torsten Schlabach (Tascel eG) wrote:
Dear list!
If I have an LDIF backup of a cn=config database, taken with slapcat,
how
would I use it to bootstrap a new server, for example, in a desaster recovery setting?
I tried it and slapadd required a configuration, but cn=config *is* the configuration and I am trying to restore it. So this is a bit of a chicken and egg problem, isn't it?
It looked that way, when we started designing this 4 years ago. But yes, we have a solution.
Is there an "official" way of doing that?
Exactly the same way as you slapcat'd it. What was the exact command
line
you used for slapcat?
-- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
On Tuesday 21 September 2010 13:55:08 Torsten Schlabach (Tascel eG) wrote:
Hi Howard!
Exactly the same way as you slapcat'd it.
I don't actually understand ... ??
What was the exact command line you used for slapcat?
slapcat -b 'cn=config'
Then try:
slapadd -F <empty/slapd.d/directory> -bcn=config -l <ldiffile>
Regards, Torsten
[..]
At Tue, 21 Sep 2010 10:35:32 +0000 "Torsten Schlabach (Tascel eG)" tschlabach@tascel.net wrote:
Dear list!
If I have an LDIF backup of a cn=config database, taken with slapcat, how would I use it to bootstrap a new server, for example, in a desaster recovery setting?
I tried it and slapadd required a configuration, but cn=config *is* the configuration and I am trying to restore it. So this is a bit of a chicken and egg problem, isn't it?
Is there an "official" way of doing that?
Slapd, etc. needs an /etc/openldap/slapd.conf file, which contains some root-level (eg bootstrap) configuration. You need to copy this file from the original server to the replacement server, and possibly edit it slightly (depending on how much of a 'clone' you are making, eg stuff like server IP numbers, hostnames, etc.).
Regards, Torsten
Hi Robert!
Slapd, etc. needs an /etc/openldap/slapd.conf file
Well, either an /etc/openldap/slapd.conf file *or* a cn=config database, I guess.
Ok, maybe a possible trick is to have a minimal slapd.conf file which just declares a cn=config database to be able to load it that way.
In that case, a cut & paste example somewhere would come in handy.
But I understand that in OpenLDAP 2.5 they think about doing away with slapd.conf entirely. This would then break your approach again.
Maybe Howard will explain a bit better what he meand by "slapadd the same way you slapcat".
Regards, Torsten
On Tue, 21 Sep 2010 07:54:13 -0400, Robert Heller heller@deepsoft.com wrote:
At Tue, 21 Sep 2010 10:35:32 +0000 "Torsten Schlabach (Tascel eG)" tschlabach@tascel.net wrote:
Dear list!
If I have an LDIF backup of a cn=config database, taken with slapcat,
how
would I use it to bootstrap a new server, for example, in a desaster recovery setting?
I tried it and slapadd required a configuration, but cn=config *is* the configuration and I am trying to restore it. So this is a bit of a chicken and egg problem, isn't it?
Is there an "official" way of doing that?
Slapd, etc. needs an /etc/openldap/slapd.conf file, which contains some root-level (eg bootstrap) configuration. You need to copy this file from the original server to the replacement server, and possibly edit it slightly (depending on how much of a 'clone' you are making, eg stuff like server IP numbers, hostnames, etc.).
Regards, Torsten
-- Robert Heller -- Get the Deepwoods Software FireFox Toolbar! Deepwoods Software -- Linux Installation and Administration http://www.deepsoft.com/ -- Web Hosting, with CGI and Database heller@deepsoft.com -- Contract Programming: C/C++, Tcl/Tk
"Torsten Schlabach (Tascel eG)" tschlabach@tascel.net writes:
Dear list!
If I have an LDIF backup of a cn=config database, taken with slapcat, how would I use it to bootstrap a new server, for example, in a desaster recovery setting?
I tried it and slapadd required a configuration, but cn=config *is* the configuration and I am trying to restore it. So this is a bit of a chicken and egg problem, isn't it?
Is there an "official" way of doing that?
something like this? http://pastebin.de/10156
-Dieter
openldap-technical@openldap.org