|
|
Return to General UNIX Home Page.
Controlling a Tape Drive
by Jeff Hunter, Sr. Database Administrator
Controlling the Tape Drive
Rewind the tape# mt -f /dev/rmt/0 rewindAdvance the tape to the 5th EOF marker on the tape without rewinding the tape# mt -f /dev/rmt/0n fsf 5Look at the current file on the tape without rewinding the tape# tar tvf /dev/rmt/0nGet current file from the tape without rewinding the tape# tar xvf /dev/rmt/0nPut all of the files in the current directory to the tape without rewinding the tape# cd /u06/app/oradata/SIEBEL # tar cvf /dev/rmt/0n *
Controlling the Tape Drive Remotely
NOTE: Make sure the remote machine has a valid entry in its .rhosts file.From the TARGET machine (i.e. APPDEV):
# rsh sblprod dd if=/dev/rmt/0n ibs=64k | tar xvf -# rsh sblprod mt -f /dev/rmt/0n fsf 5# rsh sblprod mt -f /dev/rmt/0 rewind# rsh sblprod tar tvf /dev/rmt/0n
While loop to Restore Files from Tape
while (true)
do
rsh sblprod dd if=/dev/rmt/0n ibs=64k | tar xvf -
done