Advertisement

05.28.2008 at 11:04AM PDT, ID: 23439021
[x]
Attachment Details

TAR does not use $FILES

Asked by bkreynolds48 in Linux

#######################################################################
#!/bin/ksh
# set +xv
# File: /bkup.sh
#######################################################################
#
DATE=`date +%m%d%y`
BULOG=/root/logs/bkup_$DATE.log
FILES=/root/logs/files
#
########### Start of the script. ######################################
echo " BACKUP started at `date`" > $BULOG 2>&1
echo "Where am I?" >>$BULOG
pwd >>$BULOG
find /var/subversion -print |egrep -v '*.dump' |egrep -v '*.tar' |egrep -v '*.bak' > $FILES
find /usr/nagios -print >>$FILES
#
mt -f /dev/st0 rewind
#
tar -cvf /dev/nst0   --files-from=$FILES >> $BULOG 2>&1
#
mt -f /dev/st0 rewind
#
echo " BACKUP finished at `date`" >> $BULOG 2>&1
#
####################### End of Script #################################


It looks like the tar command is NOT really using the $FILES ????


====Here is the tar command running on the system
tar -cvf /dev/nst0 --files-from=/root/logs/files
==== here is what is in $FILES
head files
/var/subversion
/var/subversion/brad
/var/subversion/brad/conf
/var/subversion/brad/conf/svnserve.conf
/var/subversion/brad/conf/passwd
/var/subversion/brad/conf/authz
/var/subversion/brad/dav
/var/subversion/brad/format
/var/subversion/brad/db
/var/subversion/brad/db/uuid
====here is the tar log file
head *.log
 BACKUP started at Wed May 28 12:25:12 CDT 2008
Where am I?
/root/logs
tar: Removing leading `/' from member names
/var/subversion/
/var/subversion/tim.dump.bak
/var/subversion/oracle.dump
/var/subversion/brad/
/var/subversion/brad/conf/
/var/subversion/brad/conf/svnserve.confStart Free Trial
[+][-]05.28.2008 at 11:48AM PDT, ID: 21663115

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Linux
Sign Up Now!
Solution Provided By: ozo
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.28.2008 at 12:04PM PDT, ID: 21663271

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628