Added archiving capability.
1 parent 8f4342c commit 87b95a4bda0a6b555a04f58cbe0f7cece0e0fd14
@root root authored on 4 Aug 2007
Showing 1 changed file
View
15
tconfigfiles
#!/bin/sh
# tconfigfiles - Manage Configuration Files
# Copyright (c) 2007 TundraWare Inc., Des Plaines, IL USA
# All Rights Reserved
# $Id: tconfigfiles,v 1.103 2007/08/04 06:58:59 root Exp $
# $Id: tconfigfiles,v 1.104 2007/08/04 07:19:40 root Exp $
 
 
SBASE="\/root\/sysgen\/configtree"
CFTREE=configtree
SBASE="\/root\/sysgen\/$CFTREE"
BASE=`echo $SBASE | sed s/\\\\\\\\//g`
CMD=`basename $0`
 
case $CMD
in
 
"cfarchive") # Make archival copy of current tree
timestamp=`date "+%Y-%m-%d-%H:%M:%S"`
cd $BASE/../
archdir=$CFTREE-$timestamp
cp -pvR $CFTREE $archdir
tar -czvf $archdir.tar.gz $archdir
rm -rf $archdir
;;
 
"cfbku") # Backup configuration files to tree
for f in $*
do