Advertisement

05.28.2008 at 08:25AM PDT, ID: 23438423
[x]
Attachment Details

Linux using TAR to backup to tape with variables in script

Asked by bkreynolds48 in Linux

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
===================================================
Start Free Trial
 
Loading Advertisement...
 
[+][-]05.28.2008 at 08:47AM PDT, ID: 21661507

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.

 
[+][-]05.28.2008 at 08:51AM PDT, ID: 21661560

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]05.28.2008 at 09:01AM PDT, ID: 21661660

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: omarfarid
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.28.2008 at 10:40AM PDT, ID: 21662505

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]05.28.2008 at 12:04PM PDT, ID: 21663277

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