Re: ispman bdb database howto ? Wim ?
Ezio Paglia <ezio-sOFouQoV90PFIYnzvfs/[email protected]> Thu, 19 May 2005 11:02:46 +0200
| Newsgroups | gmane.comp.isp.ispman.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Win, Normando and all,
the recover
db4.2_recover -h /var/lib/ldap
worked fine.
Thank you for the script and for the help.
Ciao.
Ezio.
At 23.03 18/05/05, you wrote:
>Hi Ezio,
>
>Ezio Paglia wrote:
>
>>I tried to manage the value of the cachesize, but with no results and
>>the same error.
>>If I copy a new installation of ispman ldap over the /var/lib/ldap
>>directory, slapd works; so I think that the db files are actually corrupted.
>>Do you know a pratical way to manage them ?
>
>Try:
>
>db4.2_recover -h /var/lib/ldap
>
>The command may be slightly different depending on the version of the db
>tools that you have installed.
>
>Once you have a working database, look at creating some backups :-)
>Because of all the problems and the inherit design problem of no audit
>trails in LDAP, I wrote a script to dump the database several times a day.
>Can be run as many times as desired, since it creates a timestamped file.
>This gets backed up locally, in addition to daily backups of the entire server.
>
>Wim
>
>#!/bin/bash
>
># this script creates very paranoid backups of the LDAP database
># by Wim Kerkhoff
>
>FOLDER=`date +%Y/%m/%d`
>FILE=`date +%H:%M:%S`
>BASE=/home/system-backups/controller01/ldap
>BZIP=/usr/bin/bzip2
>SLAPCAT=/usr/sbin/slapcat
>LDAPSEARCH=/usr/bin/ldapsearch
>
>#echo "let's put it in: $FOLDER/$FILE"
>
>mkdir -p $BASE/$FOLDER
>
>killall ispman-agent
>/etc/init.d/slapd stop
>$SLAPCAT | $BZIP - > $BASE/$FOLDER/${FILE}.slapcat.dat.bz2
>/etc/init.d/slapd start
>#$LDAPSEARCH -x | $BZIP - > $BASE/$FOLDER/${FILE}.ldapsearch.dat.bz2
>/etc/init.d/ispman-agent start
Ezio Paglia
Servizi Informatici (SED)
Comune di Grosseto
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click