Operating System - HP-UX
1752337 Members
5604 Online
108787 Solutions
New Discussion юеВ

Re: Making a copy of HP-UX tape

 
Nahmad_1
Advisor

Making a copy of HP-UX tape

Hi there

I got a tape created by some body as a simple data tape not a image etc on HP-UX. What is the best wa to make a duplicate tape out of it ?

Thanks

Nahmad
9 REPLIES 9
CharlesC
Advisor

Re: Making a copy of HP-UX tape

You can try with "dd" to make the binary copying.
What if...
Nahmad_1
Advisor

Re: Making a copy of HP-UX tape

Please provide the detailed syntax

Thanks

Nahmad
CharlesC
Advisor

Re: Making a copy of HP-UX tape

If you have 2 tape drives on the system, you can duplicate the tape directly:

dd if=/dev/rmt/0m of=/dev/rmt/1m

If you have only 1 tape drive on the system, you can copy the tape content into a disk file first, then copy back to another tape:

dd if=/dev/rmt/0m of=XXX
dd if=XXX of=/dev/rmt/0m

where XXX is the filename.
What if...
Dennis Handly
Acclaimed Contributor

Re: Making a copy of HP-UX tape

>CharlesC: You can try with "dd" to make the binary copying.

Does dd(1) handle multiple file marks and varying record sizes?
TTr
Honored Contributor

Re: Making a copy of HP-UX tape

> created by some body as a simple data tape

What do you mean by "simple data tape"? What method or command would you use to read this tape? You have to use the SAME method/command to make a copy of it.

If it is a tar tape you have to read it with tar and make a copy of it with tar.
CharlesC
Advisor

Re: Making a copy of HP-UX tape

> Dennis Handly:Does dd(1) handle multiple file marks and varying record sizes?

I don't think dd would handle multiple file marks nor varying record size. To my understanding dd is just to handle the copy/transfer of binary data from one media to another media in block sizes.

Staying the previous example I was assuming Nahmad has only one sector on the tape. Therefore, if there is mutiple sector on the tape then 0mn should be used instead of 0m.

Please correct me if I have anything missing or wrong.
What if...
Bill Hassell
Honored Contributor

Re: Making a copy of HP-UX tape

Dennis asks the correct question. dd can copy a dd tape as long as you know exactly how it was created. dd will make a mess out of tar, cpio, fbackup, or Ignite tapes. There is no native tape copier program. It was trivial to write such a program on the HP 1000 and MPE but Unix systems make it a bit more difficult by treating files as streams of data. Finding the length of each record and detecting EOF and EOD and EOT is a challenge, thus the lack of standard tools.

This hasn't changed for the last 20 years that I've been playing with HP-UX. There are a few commercial products (Google: tape copier) that should work but for a free solution, you'll have to know the format of the tape (ie, tar, cpio, etc), then restore the data in a temp location and then backup the data on another tape.


Bill Hassell, sysadmin
Steven Schweda
Honored Contributor

Re: Making a copy of HP-UX tape

> [...] you have to [...]

> [...] you'll have to [...]

At long last, we've finally found the
computer problem which admits only one
solution. This wonderful finding should be
published more widely, as it will be the
source of much amazement.

Irregardful, it might help to have some idea
of how the tape was created. A "simple data
tape" is not a well-defined object.
Dennis Handly
Acclaimed Contributor

Re: Making a copy of HP-UX tape

>Bill: It was trivial to write such a program on MPE

Right, I was responsible for the FCOPY utility decades ago.
You just tell the OS you wanted Undefined length records, of a maximum size, and how many files you wanted to copy. Of course you needed to use two round tapes.