Operating System - HP-UX
1753261 Members
4976 Online
108792 Solutions
New Discussion юеВ

Commands to manipulate the tape drive

 
SOLVED
Go to solution
Samshen
Frequent Advisor

Commands to manipulate the tape drive

Hi,
I am using Oracle exp utility to perform exports of the tables. I have to make a backup in the tape directly from the EXP utility.
Please tell me which is HPUX command which displays the content of the tape.
I want to run several exports on the same tape. Which is the command that moves the tape past the last export, so that the second execution of EXP utility does not overwrite the previous export?

Thank you.
4 REPLIES 4
Dennis Handly
Acclaimed Contributor
Solution

Re: Commands to manipulate the tape drive

>Please tell me which is HP-UX command which displays the content of the tape.

Only the commands that write the tape know how to read it.

>Which is the command that moves the tape past the last export

The tape would have to be a norewind device.
See mt(1): mt [-f tapename] fsf
Laurent Menase
Honored Contributor

Re: Commands to manipulate the tape drive

you can also dd a record to a file

you need first to identify the block size of the record
with for instance a
dd if=/dev/tmp/0mn ibs=1024k obs=1 count=1 of=/dev/null
0+1 records in
655360+0 records out

- the number given in the out summary is the bloc size

Then you reposition your tape
dd if=/dev/rmt/0mn of=myfile bs=655360

Then you can look at the content of the file.
Steven E. Protter
Exalted Contributor

Re: Commands to manipulate the tape drive

Shalom,

You might do better writing your file to local disk and then going to tape with it.

The exp utility has a parameter that permits you to change the target file you write do.

That can be tape, that can be disk.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bill Hassell
Honored Contributor

Re: Commands to manipulate the tape drive

Copying a tape in Unix can be quite problematic as there is no general purpose tool that works like tape duplicators on mainframes. To duplicate a tape, each read must reserve enough space for the largest possible record (which is usually unknown), then read each record with a status so that filemarks and EOT can be detected.

The mt command can be used to position a tape past a record or a file. But as seasoned sysadmins will tell you, you will make a mistake and destroy everything on the tape. And of course, there is no table of contents except a small sticky note that will get lost.

The cost of lost data far exceeds the small cost of extra tapes.


Bill Hassell, sysadmin