Operating System - HP-UX
1838263 Members
3297 Online
110125 Solutions
New Discussion

command for copying to /dev/rmt tape device.

 
Kannan Padmanabhan
New Member

command for copying to /dev/rmt tape device.

Hello!
I am HPUX-11.0 and I want to copy bunch of tar files to the tape device. I need
to know what is the right command that I could use.

[oracle@usbhhp88:/dev/rmt] ls
0m 0mnb c0t6d0BESTn c0t6d0DDSb stape_config
0mb c0t6d0BEST c0t6d0BESTnb c0t6d0DDSn
0mn c0t6d0BESTb c0t6d0DDS c0t6d0DDSnb

Thanks,
Kannan.
3 REPLIES 3
Anthony Goonetilleke_1
Regular Advisor

Re: command for copying to /dev/rmt tape device.

Firstly try a
ioscan -C tape -fun
now you should see a list of backup device names
usually I use /dev/rmt/0m which in most cases is the default DDS drive on a
machine when I use tar some of the other device names are used for compatibilty
as well as compression etc.
Neil Gast_1
Frequent Advisor

Re: command for copying to /dev/rmt tape device.

If I understand correctly, you would like to copy a bunch of tar files to tape.
Correct? It's no different than copying normal files to tape.
The easiest way is probably to use tar. If all of the files are in the same
directory, you can do something like:
cd /mydir; tar cv *.tar
Or, if you have tar files in different directories, you can get to all of them
like so:
(1) create a text file containing the paths to all tar files to be backed up.
It might look something like this:
/usr/local/file1.tar
/var/tmp/file2.tar
/home/foo/file3.tar
(2) Assuming you save this text file as /tmp/tarlist, use this command to get
them all onto tape:
tar cv `cat /tmp/tarlist`

Each of the above tar commands assumes you are using the default tape device,
/dev/rmt/0m. If using a different tape device, the two tar commands from above
might look something like so:
cd /mydir; tar cvf /dev/rmt/c3t1d0DDS *.tar
and
tar cvf /dev/rmt/c3t1d0DDS `cat /tmp/tarlist`

Enjoy,
MrNeil
Kannan Padmanabhan
New Member

Re: command for copying to /dev/rmt tape device.

Let me rephrase my question:
I want to backup files everyday manually to the tapedrive using the tar
command.
Also, I would like to try to extract the archives from the tape occasionally.
I tried
tar -cvf /dev/rmt/0m .
This works. When I try to add one more archive to the tape, it errors out.
When I try to look for
tar -tvf /dev/rmt/0m it errors out.
Can somebody help me with the archiving to tape please.
Thanks,
Kannan.
(610) 231-8111.

What I get when I run the command
$ioscan -C tape -fun
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
tape 0 0/0/1/0.6.0 stape CLAIMED DEVICE HP C1537A
/dev/rmt/0m /dev/rmt/c0t6d0BESTn
/dev/rmt/0mb /dev/rmt/c0t6d0BESTnb
/dev/rmt/0mn /dev/rmt/c0t6d0DDS
/dev/rmt/0mnb /dev/rmt/c0t6d0DDSb
/dev/rmt/c0t6d0BEST /dev/rmt/c0t6d0DDSn
/dev/rmt/c0t6d0BESTb /dev/rmt/c0t6d0DDSnb