Public feed #722979

Miscellany

public text v1 · immutable
Raw Edit
·published 2007-10-02 13:36 UTC
rendered paste body
#!/bin/bash
#
# LDAP directories backup script
#
# Jean-Francois Theroux <jftheroux@penson.ca>
#
# 2007.09.10
destDir="/var/backups/ldap"

# Slapd running?
pidof slapd 2>&1 > /dev/null

if [ $? != 0 ]; then
        exit 1
fi

# destDir verification
test -d $destDir || exit 1

# Compress
slapcat > /var/backups/ldap/ldap-backup-`date +%F`.ldif