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

Re[2]: openldap db wiped?



SA> I've opened a thread with same problem in last November.

SA> http://www.openldap.org/lists/openldap-software/200412/msg00080.html

SA> The last advise was: "Set a crontab script that runs db_checkpoint in
SA> every 5 minutes." This forces to write bdb logs to disk.

SA> Here is mine: (I've found it on the net. :-))

SA> DBCHKPOINT=/usr/local/BerkeleyDB.4.2/bin/db_checkpoint

SA> for dbdir in `awk '/^[:space:]*directory[:space:]*\w*/ {print $2}' /etc/ldap/slapd.conf`
SA>   do
SA>     if [ -n "`find ${dbdir}/*.bdb 2>&-`" ]
SA>                 then
SA>                         if [ -n "$DBCHKPOINT" ]
SA>                         then
SA>                                 printf "Running %s on %s\n" "$DBCHKPOINT" "${dbdir}"
SA>                                 $DBCHKPOINT -v -1 -h ${dbdir} 2>&1 >/dev/null
SA>                         else
SA>                                 printf "Warning: no
SA> db_checkpoint available for %s\n" ${dbdir}
SA>                         fi
SA>                 fi
SA> done



what is the difference between running this script every 5 mins and
having a "checkpoint 5 X"   directive in slapd.conf?

thanks,
Karolis