How to archive data using the AIT2 attached to CDF17


Archiving data onto tape:
First make certain that you are logged onto cdf17

cdf17> tar -cvf /dev/nst0 filename

*tar indicated the use of tape archiving
-c stands for create
v stands for verbose so that a printout of the files will occur as they are done transferring
f stands for form
filename is the name of the file/directory you are archiving ****note: you do not want to type the
entire file path -- cd to the next largest directory and then type in the directory or filename you
want archived --- typing in the entire file path can cause complications with outsider accessing ****


This process will create a directory, then copy the files into the directory*



Restoring Files
put the tape into the drive, and cd to the directory in which you want to restore your file, then type at the cdf17 prompt
cdf17> tar -xvf /dev/nst0

* -xvf will extract a file and printout the name of the file as it is extracted
the tar command will create the directory on the tape into whatever directory you
cd-ed into
To list the contents of the current directory use: tar -t*




Helpful commands for checking your data and placement on tape

cdf17> mt -f /dev/nst0 status

* this asks the tape what's up
mt stands for magnetic tape
-f stands for from and is followed by the /dev/nst0
status simply asks the tape what its status is and will indicate placement of tape*



cdf17> tar -tf /dev/st0

* -tf shows you the table of contents and simply lists the filenames *



cdf17> tar -tvf /dev/nst0

* This acts like ls -lh, and shows you the filenames and their properties *



cdf17> mt -f /dev/nst0 fsf 1

* this has you jump forward one file
fsf means forward skip file and 1 indicates the number of files you want to skip over *



* NOTE: the difference between nst0 and st0 is that st0, when used,
AUTOMATICALLY REWINDS THE TAPE REGARDLESS of the function being performed.
thus it is best to use nst0 so that you are certain of your location on the tape *



cdf17> mt -f /dev/nst0 eod

* moves the tape marker to the end of data *



cdf17> man mt

* THIS WILL GIVE YOU A LISTING OF ALL THE mt COMMANDS which are listed below *



cdf17> man tar

* THIS WILL GIVE YOU A LISTING OF ALL THE tar COMMANDS *



cdf17> mt -f /dev/nst0 rewoffl

* this rewinds the tape and takes it offline --- a much simpler way of doing this is pressing
the eject button...ait2 is not mounted so you can press the eject button and it will automatically
rewind before ejecting *

BUT SEE BELOW


cdf17> mt -f /dev/nst0 load

If you use mt -f /dev/nst0 rewoffl to rewind and eject a tape, use this command once a new tape is inserted into the drive, or else you will get input/output errors.