Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tape Device Names / Functions

Status
Not open for further replies.

Roomer

Technical User
Oct 1, 2001
100
GB
I am referring to a book, "The AIX Survival Guide" by Andreas Siegert, and within his chapter on tape device names and functions he has been a little vague.

Can anyone be more specific as to what the term 'Retention on Open' means.. Is this the same as the 'Retension' paramter available for the tctl command? Or does it keep data on the tape?

Many thanks,
:-V
 
As far as I know it should be retension. Probably an error at the proof reading stage of the book! ;-)
 
Thanks Ken..

Wonder if you can clear something up for me...

Here is an excert from my backup script - should this work in theory?

daily_bkup()
{
echo "*************************************************************************" >> $logfile
echo "SAVEVG of volume groups USERVG1, USERVG2 & USERVG3 started AT `date`" >> $logfile
echo "*************************************************************************" >> $logfile
echo "" >> $logfile

for vg in uservg1 uservg2 uservg3
do
./usr/bin/savevg -f $NOREWIND1 '-i' '-m' '-X' $vg
done

if [ $? -eq 0 ]
then
echo "*************************************************************************" >> $logfile
echo "SUCCESS: Volume Group Backups completed successfully at `date +%H:%M`" >> $logfile
echo "*************************************************************************" >> $logfile
echo "" >> $logfile
else
echo"**************************************************************************************" >> $logfile
echo "FAIL: Volume Group Backups Failed at `date`" >> $logfile
echo "*************************************************************************************" >> $logfile
echo "" >> $logfile
fi
}


NOREWIND1 is specified as /dev/rmt1.1
:cool:
 
Hi Roomer. Sorry, I'm not an expert in AIX backups, but reading your script, I would say that you don't need to include the -i option if you're using -m as well. In addition, why do you need the apostrophies around the '-m' '-X' etc? I would have thought (though I don't know) that the savevg command would accept these as options without the quotes. Are you really wanting the output from this script to go to the same file every time it is run (which is what the first >> implies, unless you've set it with a date extension or similar earlier). If not, it might just be easier to use something of the form backuplog.`date` in place of $LOGFILE or whatever.

Hopefully someone else with more experience of AIX will be able to advise better on the savevg and flags issue. Hope this helps anyway.
 
Be sure to get rid of the "." in "./usr/bin/savevg".

You don't need the ' characters around arguments

Get rid of all the ">> $logfile" commands and insert the following line after the "{"
exec 1>>$log 2>>$log
This will capture all output into $logfile, and eliminate all of the redirects. Additionally, if the savevg command spits out an error, it will show up. In your configuration, you'd miss that.

As for the core backup logic, just be sure to do a rewind before the backup starts, just to be sure. You might want to do an eject when done.

Be careful about echo "****" commands. Remember, "*" is a wildcard file specifier. I use "#" characters, personally.

Regards, Bill.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top