diff options
author | Jonas Smedegaard <dr@jones.dk> | 2002-03-25 15:52:49 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2002-03-25 15:52:49 +0000 |
commit | dcbe394d6d9dac47d651db97ba9f041a943eb320 (patch) | |
tree | 12fed8bfb654a7d205e30303ee75358bdb1f575a | |
parent | 273e78337263ff700a6925e6a492b8c4eb58d6d0 (diff) |
New script localbackupconfig.
-rwxr-xr-x | localbackupconfig | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/localbackupconfig b/localbackupconfig new file mode 100755 index 0000000..a9b1e25 --- /dev/null +++ b/localbackupconfig @@ -0,0 +1,19 @@ +#!/bin/sh +# +# /usr/local/sbin/localbackupconfig +# Copyright 2001 Jonas Smedegaard <dr@jones.dk> +# +# $Id: localbackupconfig,v 1.1 2002-03-25 15:52:49 jonas Exp $ +# + +FQDN=`hostname -f` +BACKUPDIR=/var/local/backups/$FQDN + +find $BASE -path '*Attachments*' -size +15000k -exec rm '{}' ';' +for i in `find /etc -name '*.orig' | sed -e 's,\.orig$,,'`; do + if [ -e $i ]; then + mkdir -p $BACKUPDIR/`dirname $i` + cp -fa $i $BACKUPDIR/$i + diff -ruN $i.orig $i > $BACKUPDIR/$i.diff + fi +done |