-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackup_ldap.sh
More file actions
27 lines (24 loc) · 883 Bytes
/
backup_ldap.sh
File metadata and controls
27 lines (24 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# Veriosn 1.0
##############################################################################
# backup_ldap.sh
#
# Script by C4 Tech and Design http://www.c4tech.com
#
# This is a simple shell script to backup a LDAP database with rsnapshot.
#
# The assumption is that this will be invoked from rsnapshot. Also, since it
# will run unattended.
#
# This script simply needs to dump a file into the current working directory.
# rsnapshot handles everything else.
#
# Usage backup_ldap.sh localhost or backup_ldap.sh ip or hostname
# and use that in rsnapshot configureation
#
# Of course you should exchange keys with host to login without a password
##############################################################################
source /usr/local/bin/libC4Rsnapshot.sh
FILENAME=ldapdump_$1.ldif.gz
COMMAND="/usr/sbin/slapcat"
runThis $1 "LDAP Backup" $FILENAME $COMMAND