Browse Source

Initial revision

pull/10/head
cns 18 years ago
committed by butlerx
parent
commit
df6edae771
2 changed files with 23 additions and 0 deletions
  1. +4
    -0
      .htaccess
  2. +19
    -0
      continous_rrs_backup.sh

+ 4
- 0
.htaccess View File

@@ -0,0 +1,4 @@
AuthType Basic
AuthName "RRS"
AuthUserFile "/usr/pkg/share/httpd/rrs_htpasswd"
Require valid-user

+ 19
- 0
continous_rrs_backup.sh View File

@@ -0,0 +1,19 @@
#! /bin/sh
#
# Simple way of dumping live ldap database and rrs.log file and copying them
# somewhere else.
#
while [ 1 ]; do
# Can't use slapcat safely as the ldap database is read-write and in use.
ldapsearch -x -w "LDAP-SECRET" -D cn=root,ou=ldap,o=redbrick -h localhost > shrapnel.ldif.bak
# We're paranoid.
sync; sync; sync
# Again with the paranoia.
cp rrs.log rrs.log.bak
# Assumes SSH agent is running.
scp shrapnel.ldif.bak rrs.log.bak carbon:
# More healthy paranoia.
ssh carbon 'cp shrapnel.ldif.bak shrapnel.ldif; cp rrs.log.bak rrs.log'
# Wait 5 minutes.
sleep 300
done

Loading…
Cancel
Save