Hi Kurt, Hi Roland,
we use a simple script that shutsdown the LDAP server for just 2 seconds
every 12h, copy the directories to a backup dir and restarts the server.
After the Script you could do a ldbmcat on the backuped dir which is always
offline.
##### Start Script on Compaq ProLiant DL360, SuSE 7.0 linux kernel 2.2.16,
OpenLDAP 1.2.11
#!/bin/sh
SLAPD_CONF="/etc/openldap/slapd.conf"
ORIGIN="ldap"
BACKUP="ldap.backup"
rcldap stop
for db in `cat $SLAPD_CONF | grep ^directory | cut -f 2`; do
db_backup=`echo "$db" | sed -e "s,$ORIGIN,$BACKUP,g"`
mkdir -m 0700 -p $db_backup
echo "Creating Backup of $db in `dirname $db_backup`"
cp -rpf $db `dirname $db_backup`
done
rcldap start
###### End Script
Roland Rosenfeld schrieb:
Hi Kurt!
On Wed, 17 Jan 2001, Kurt D. Zeilenga wrote:
slapcat: could not open database.
Make sure slapd is not running.
Ah, many thanks, that helped.
But this doesn't help me with my initial problem: I want to backup the
LDAP server. Is it safe to backup the gdbm files only? I personally
would prefer to backup a LDIF file, which can also be used on a
machine with a different hardware architecture. That's why I was
looking for slapcat. But on a production machine I cannot stop slapd
while running slapcat, because the server needs to be available all
the time.
So my new question is: how do you backup the data of your LDAP servers?
Tschoeeee
Roland
--
Dirk Datzert
Rasselstein Hoesch GmbH
Informatik / Anwendungsentwicklung
D-56626 Andernach
Koblenzer Strasse 141
http://www.rasselstein-hoesch.de
Tel.: +49 (0) 2631 81-4595
Fax.: +49 (0) 2631 81-15-4595
mailto:Dirk.Datzert@rasselstein-hoesch.de