troubleshooting Question

Linux using TAR to backup to tape with variables in script

Avatar of bkreynolds48
bkreynolds48 asked on
Linux
6 Comments1 Solution637 ViewsLast Modified:
I am trying to get my backup script to work with tar on a linux system.
The varialble FILES is where I put a list of files to be backed up but this is not working.
================
here is the ouput produced by the script
================================
 BACKUP started at Wed May 28 10:10:44 CDT 2008
Where am I?
/root/logs
tar: Removing leading `/' from member names
/root/logs/files
 BACKUP finished at Wed May 28 10:10:49 CDT 2008
==========================================
here is the script
==========================================
#!/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 |grep -v *.dump |grep -v *.tar > $FILES
find /usr/nagios -print >>$FILES
#
mt -f /dev/st0 rewind
#
tar -cvf /dev/nst0 $FILES >> $BULOG 2>&1
#
mt -f /dev/st0 rewind
#
echo " BACKUP finished at `date`" >> $BULOG 2>&1
===================================================
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 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 6 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