Added logic to store archives in separate directory.
1 parent 87b95a4 commit 6cedf20718243346af9f53a6a53e729088801193
@root root authored on 4 Aug 2007
Showing 1 changed file
View
5
tconfigfiles
#!/bin/sh
# tconfigfiles - Manage Configuration Files
# Copyright (c) 2007 TundraWare Inc., Des Plaines, IL USA
# All Rights Reserved
# $Id: tconfigfiles,v 1.104 2007/08/04 07:19:40 root Exp $
# $Id: tconfigfiles,v 1.105 2007/08/04 07:27:15 root Exp $
 
 
ARCHIVES=configarchives
CFTREE=configtree
SBASE="\/root\/sysgen\/$CFTREE"
BASE=`echo $SBASE | sed s/\\\\\\\\//g`
CMD=`basename $0`
timestamp=`date "+%Y-%m-%d-%H:%M:%S"`
cd $BASE/../
archdir=$CFTREE-$timestamp
cp -pvR $CFTREE $archdir
tar -czvf $archdir.tar.gz $archdir
tar -czvf $ARCHIVES/$archdir.tar.gz $archdir
rm -rf $archdir
;;
 
"cfbku") # Backup configuration files to tree