OK thats the scripts i use at the moment, i have not completed my work and i am also searching for scripts better than mine, use it at your own risk !!!:

LDAP:------------------------------------------------------------------------------
#!/bin/bash
######
# ldap_dump.sh
# - create an LDAP dump and save it into a "secure" directory
#
# Autor: Frank Proessdorf
######
PFAD=/home/backup/ldap
DATE=date +%d%m%y
DUMPFILE=ldapdb_$DATE.ldif
# create secure folder if it doesn't exist
if [ ! -d $PFAD ]
then
echo "Sicherer Pfad wird angelegt.."
mkdir $PFAD
chmod 700 $PFAD
fi
cd $PFAD
# dump LDAP
slapcat -l $DUMPFILE
# gzip the dump
gzip $DUMPFILE
# set correct mode
chmod 600 $DUMPFILE.gz
# finden und löschen von dateien die älter sind als x (-mtime +14) Tage
find /home/backup/ldap -iname 'ldapdb_*.ldif.gz' -mtime +14 | xargs --no-run-if-empty rm -f
#####
# The LDIF generated by this tool is suitable for use with slapadd(

.
# As the entries are in database order, not superior first order, they cannot
# be loaded with ldapadd(1) without first being reordered.
#####
MYSQL:------------------------------------------------------------------------------
#!/bin/bash
###### mysql backup-script #####
# Verzeichnis anlegen
mkdir /home/backup/mysql/mysql_date '+%d%m%y'
# Datenbank dumpen
mysqldump -u root -h localhost -A > /home/backup/mysql/mysql_date '+%d%m%y'/mysqldb_date '+%d%m%y_%H%M'.sql
# Gzippen
gzip -f /home/backup/mysql/mysql_date '+%d%m%y*'/*.sql
# Finden von Datein/Verzeichnisen die älter als x Tage sind und löschen
find /home/backup/mysql/mysql* -iname 'mysqldb*.sql.gz' -mtime +14 | xargs --no-run-if-empty rm -f
# Finden von Datein/Verzeichnisen die älter als x Tage sind und löschen
find /home/backup/mysql -iname 'mysql*' -mtime +14 | xargs rm -f -r
PGSQL:------------------------------------------------------------------------------
#!/bin/bash
##### pgsql backup-script #####
# Verzeichnis anlegen
mkdir /home/backup/pgsql/lxoffice_date '+%d%m%y'
mkdir /home/backup/pgsql/openexchange_date '+%d%m%y'
mkdir /home/backup/pgsql/template1_date '+%d%m%y'
# Datenbank dumpen
pg_dump -U postgres lxoffice > /home/backup/pgsql/lxoffice_date '+%d%m%y'/lxofficedb_date '+%d%m%y_%H%M'.sql
pg_dump -U postgres openexchange > /home/backup/pgsql/openexchange_date '+%d%m%y'/openexchangedb_date '+%d%m%y_%H%M'.sql
pg_dump -U postgres template1 > /home/backup/pgsql/template1_date '+%d%m%y'/template1db_date '+%d%m%y_%H%M'.sql
# Gzippen
gzip -f /home/backup/pgsql/lxoffice_date '+%d%m%y*'/*.sql
gzip -f /home/backup/pgsql/openexchange_date '+%d%m%y*'/*.sql
gzip -f /home/backup/pgsql/template1_date '+%d%m%y*'/*.sql
# Finden von Datein/Verzeichnisen die älter als x Tage sind und löschen
find /home/backup/pgsql/lxoffice* -iname 'lxoffice_*.sql.gz' -mtime +14 | xargs --no-run-if-empty rm -f
find /home/backup/pgsql/openexchange* -iname 'openexchange_*.sql.gz' -mtime +14 | xargs --no-run-if-empty rm -f
find /home/backup/pgsql/template1* -iname 'template1_*.sql.gz' -mtime +14 | xargs --no-run-if-empty rm -f
# Finden von Datein/Verzeichnisen die älter als x Tage sind und löschen
find /home/backup/pgsql -iname 'pgsql*' -mtime +14 | xargs rm -f -r
regards
fpausp