wiki.getshifting.com

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


start

SHIFT-WIKI - Sjoerd Hooft's InFormation Technology

This WIKI is my personal documentation blog. Please enjoy it and feel free to reach out through blue sky if you have a question, remark, improvement or observation. See below for the latest additions, or use the search or tags to browse for content.


OpenDS LDIF Export

Summary: How to do a openDs LDIF export.
Date: Around 2012
Refactor: 8 March 2025: Checked links and formatting.

This script will create a ldif export from a running OpenDS installation.

#!/bin/bash
# set -x
# Created by s.hooft, 22-03-2011, sjoerd_warmetal.nl

### Script Variables
WHATAMI=`basename $0`

### LDAP Variables
DUMPDIR=/var/backup/ldif
MANAGER=cn=manager
PASSWD=xxxxxxxx
HOSTNAME=`hostname`
HOSTNAME_SHORT=`hostname -s`
LDAPBASE="o=company.local"

### Offsitecopy Variables
GZIP=/usr/bin/gzip
. "/opt/scripts/mail.txt"
. "/opt/scripts/offsitecopy.func"
TOUSER="repluser"
TOHOST="syncsrv.company.local"
TODIR="/srv/syncdata/LDAP"
LDIFFILE=${DUMPDIR}/${HOSTNAME_SHORT}-LDAP_`date +%Y%m%d%H%M`.ldif
BACKUPFILE="$LDIFFILE.gz"
LOGFILE=${DUMPDIR}/ldapbackup.log
DOCOPY="1"

### Create new logfile
echo "Creating ldif backup $LDIFFILE using $MANAGER on $LDAPBASE" > $LOGFILE

mailFunction() {
   if [ "$1" == "LDIF" ]; then
      echo "LDIF backup was not created succesfully, consult $LOGFILE on ${HOSTNAME}" | mail -s "Failed $1 Backup" $MAILTOFAIL
   fi
   if [ "$1" == "GZIP" ]; then
      echo "Tar or zip was not created succesfully, consult $LOGFILE on ${HOSTNAME}" | mail -s "Failed $1 Backup" $MAILTOFAIL
   fi
   exit
}

backupFunction () {
   /opt/OpenDS-2.2.0/bin/export-ldif --bindDN "$MANAGER" --bindPassword "$PASSWD" --backendID userRoot --trustAll --excludeAttribute entryUUID --ldifFile $LDIFFILE >> $LOGFILE
   LDIFRESULT=$?
   if [ ! "$LDIFRESULT" == "0" ]; then
      mailFunction LDIF
   fi
   $GZIP $LDIFFILE >> $LOGFILE
   GZIPRESULT=$?
   if [ ! "$GZIPRESULT" == "0" ]; then
      mailFunction GZIP
   fi
   copyFunction
}

copyFunction() {
   if [ "$DOCOPY" == "1" ]; then
      offsitecopy "${BACKUPFILE}" "$TOUSER" "$TOHOST" "$TODIR" "$LOGFILE" "$WHATAMI" "$HOSTNAME" "$MAILTOSUCCESS" "$MAILTOFAIL"
   else
      echo >> $LOGFILE
      echo "Copy to offsite location is not enabled." >> $LOGFILE
      echo "Modify the script under Offsitecopy Variables to enable offsitecopy" >> $LOGFILE
      echo >> $LOGFILE
   fi
}

backupFunction

exit

The offsitecopy.func and mail.txt can be found here.

This wiki has been made possible by:

2025/06/01 11:59

OpenDS Installation

Summary: This post describes the installation and configuration of the OpenDS 2.2.0 directory server on AIX..
Date: Around 2012
Refactor: 8 March 2025: Checked links and formatting.

→ Read more...

2025/06/01 11:59

OpenDS LDAP Indexes

Summary: How to manage indexes in OpenDS.
Date: Around 2012
Refactor: 8 March 2025: Checked links and formatting.

→ Read more...

2025/06/01 11:59

NetApp Storage Monitoring

Summary: How to install a NetApp Storage Monitoring server using onCommand Unified Manager 5.1.
Date: Around 2011
Refactor: 8 March 2025: Checked links and formatting.

We just got a brand new FAS3250C or Nseries N6250 (they are the same) and we decided to reinstall our storage monitoring server, since the software has been replaced by new versions with new functionality. We will run in Windows Server 2008 R2 (since 2012 is not supported by all required software), and will install and run the following software and services:

  • IOmeter
  • onCommand Unified Manager 5.1

The Unified Manager should be replacing the old DFM (data fabric manager / Operations Manager) which is required for the performance monitoring.

At the end of the configuration we will also configure a few custom reports.

→ Read more...

2025/06/01 11:59

<< Newer entries | Older entries >>

This wiki has been made possible by:

start.txt · Last modified: by sjoerd