troubleshooting Question

TAR does not use $FILES

Avatar of bkreynolds48
bkreynolds48 asked on
Linux
3 Comments1 Solution302 ViewsLast Modified:
#######################################################################
#!/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.conf
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros