it is a given that you've pre-pop'd all with the correct stuff in /etc/default/ldap and in /etc/ldap , too. i like to keep a copy of DB_CONFIG around, because it is nifty.
slapit.sh
#!/bin/bash TIMESTAMP=$(date '+%Y%m%d%H%M') BACKUPDIR=/nfs/export /etc/init.d/slapd stop ; mv /var/lib/ldap /var/lib/ldap-$TIMESTAMP ; mkdir /var/lib/ldap ; cp /etc/ldap/DB_CONFIG /var/lib/ldap ; slapadd -c -l /tmp/$BACKUPDIR/backup.ldif ; chown -R openldap.openldap /var/lib/ldap ; /etc/init.d/slapd startDB_CONFIG
set_cachesize 0 2097152 0 set_lk_max_objects 1500 set_lk_max_locks 1500 set_lk_max_lockers 1500