From dcbe394d6d9dac47d651db97ba9f041a943eb320 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 25 Mar 2002 15:52:49 +0000 Subject: New script localbackupconfig. --- localbackupconfig | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 localbackupconfig (limited to 'localbackupconfig') 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 +# +# $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 -- cgit v1.2.3