summaryrefslogtreecommitdiff
path: root/localbackupconfig
blob: a9b1e253c97bccda528c80602223d96ce3675c38 (plain)
  1. #!/bin/sh
  2. #
  3. # /usr/local/sbin/localbackupconfig
  4. # Copyright 2001 Jonas Smedegaard <dr@jones.dk>
  5. #
  6. # $Id: localbackupconfig,v 1.1 2002-03-25 15:52:49 jonas Exp $
  7. #
  8. FQDN=`hostname -f`
  9. BACKUPDIR=/var/local/backups/$FQDN
  10. find $BASE -path '*Attachments*' -size +15000k -exec rm '{}' ';'
  11. for i in `find /etc -name '*.orig' | sed -e 's,\.orig$,,'`; do
  12. if [ -e $i ]; then
  13. mkdir -p $BACKUPDIR/`dirname $i`
  14. cp -fa $i $BACKUPDIR/$i
  15. diff -ruN $i.orig $i > $BACKUPDIR/$i.diff
  16. fi
  17. done