Current location

narf Source control manager Git

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshtrom <shtrom@1991c358-8f32-0410-a49a-990740bdf4c2>2014-07-24 00:42:18 +0000
committershtrom <shtrom@1991c358-8f32-0410-a49a-990740bdf4c2>2014-07-24 00:42:18 +0000
commitc5c78e9cceb4e90a1a5e0690f62586bb928fcfca (patch)
treeb1cbd75584ab04ff07b8b580aec173bc69fe3b73
parentf1a8fd133d9d5841b537522710e2fd724e1a7037 (diff)
LDAP dumping logics
git-svn-id: svn+ssh://scm.narf.ssji.net/svn/shtrom/scripts@1906 1991c358-8f32-0410-a49a-990740bdf4c2
-rwxr-xr-xopenbsd/backup.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/openbsd/backup.sh b/openbsd/backup.sh
index b188c0c..0f147ba 100755
--- a/openbsd/backup.sh
+++ b/openbsd/backup.sh
@@ -9,6 +9,8 @@ REMOTEBACKUPDIR="`hostname -s`@${BACKUPSERVER}::/share/homes/`hostname -s`"
EXCLUDEALWAYS="${BACKUPROOT} /srv/backup/ /srv/www/sites/offlines.fr/"
MYSQLDUMPDIR="/srv/dbdumps/"
MYSQLUSER="dumper"
+LDAPDUMPDIR="/srv/dbdumps/"
+LDAPUSER="cn=root,dc=example,dc=net"
TMPSUBDIR=/tmp
# Dump privilege information [0]
@@ -38,6 +40,12 @@ if [ ! -z "$MYSQLDUMPDIR" ]; then
mysqldump --comments --dump-date -u ${MYSQLUSER} -A --events --ignore-table=mysql.event > ${MYSQLDUMP}
mysqldump-grants -u ${MYSQLUSER} >> ${MYSQLDUMP}
fi
+
+if [ ! -z "$LDAPDUMPDIR" ]; then
+ LDAPDUMP="${LDAPDUMPDIR}ldap.dump.sql"
+ echo -n " ldap (${LDAPDUMP}) NOT"
+ # ldapvi --out --host localhost -D ${LDAPUSER} > ${LDAPDUMP}
+fi
echo "."
echo -n "Backing up to ${EFFECTIVEBACKUPDIR}:"