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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scripting Help, data from tapes & FTP

Status
Not open for further replies.

justateke

MIS
Jul 6, 2006
2
0
0
US
Background
We have several hundred backup tapes containing data. This data was stored on these tapes using a Silcon Grahpics WS and an 8mm tapedrive. The O/S on the SGWS is IRIX Release 6.5 IP22 IRIS.
I know DOS and Windows and very little UNIX and even less IRIX.

Task Details
I have been asked to do the following:
- Restore the data from the tapes to a directory on the SGWS.
- Copy the data to a Windows Server.
- Write the data to CDs and/or DVDs .

Now I know some scripting and figure with this many tapes and this amount of data that a script would be ideal to get the data off the tapes and into a directory, then another script to transfer the data to the Windows Server. I also figure that transferring the data using FTP would be the best choice. (Yes, the Windows Server is also an FTP Server.) Once the data is on the Windows Server, I am home free!

Problem
Being as I know so little about UNIX and/or IRIX how does one go about writing a script? Which commands would I use? (tar looks like one of the main ones, at least to get the data off the tapes.) Then there’s the scripting of FTP, which I have not done, but figure it should work.

Any and all help greatly appreciated.

Thanks,
J

 
Well, since I haven't received any posts, AND since I have been working on this I thought I would share what I have learned so far.

I am able to create directories and get the data from the tape into those directories. Here is the script to do that:
#!/bin/sh
# GetData.bat
#
i="0"
while [ $i -le $1 ]
do
mkdir $i
mt fsf $i
cd $i
tar x
cd ..
i=`expr $i + 1`
done
exit

This script requires a number after the filename used to invoke it, i.e., ./GetData.bat 7. The number is the number of data sets on the tape. Fortunately all my tapes have that information hand written on the tape label.

Here are some other things I learned so far:
- To execute a script I first need to grant those
permissions using the chmod command.
- Almost all documentation, some good, some not so
good, can be found on the system by typing man
before any command.
- Not all documentation on the Internet has correct
syntax. Lots of trial & error!
- Backup data on a tape is stored in sets and one
tape can have many sets. Once one set is read the
tape just sits there and waits for the command to
read the next set.

Now I need to automate the FTP process.

Please feel free to offer any suggestions, and stay tuned for more. I will make this work and I will post my findings here.

Thanks,
J
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top