1834814 Members
2638 Online
110070 Solutions
New Discussion

Copy Tape to Tape

 
SOLVED
Go to solution
Monte Heeren
Frequent Advisor

Copy Tape to Tape

What is the best way to copy a DDS tape to DDS tape? I tried:
dd if=/dev/rmt/0m of=/dev/rmt/1m.

The command completed, but it looks like it only copied one file. I have three files on the first tape. When I do a tar -tvf /dev/rmt/1m, I only see the first file and then it says :Tar end of tape
:Tar to continue, enter
device/file name when ready
or null string to quit.
10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: Copy Tape to Tape

Shalom,

maybe try again with the bs= parameter.

Also, don't forget mt -t and rewind the tapes before you start.

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
melvyn burnard
Honored Contributor
Solution

Re: Copy Tape to Tape

If it is a tar format tape, I usually use
dd if=/dev/rmt/0m of=/dev/rmt/1m bs=10k
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
A. Clay Stephenson
Acclaimed Contributor

Re: Copy Tape to Tape

If you are copying multiple file images then you must use the norewind devices and if these are tar images then you should use 10k blocking.

Insert both tapes:
#usr/bin/sh

src=/dev/rmt/0mnb
DEST=/dev/rmt/1mnb
BS=10k
mt -f ${SRC} rew # force a rewind
mt -f ${DEST} rew

Now for each image on the tape:
dd if=${SRC} of=${DEST} bs=${BS}

Repeat until dd reports an error.

and finallly eject the media:

mt -f ${SRC} offl # rewind and eject
mt -f ${DEST} offl



If you are putting multiple tar images on a medium, you are really asking for trouble because one mistake can overwrite a previous image and render the entire medium useless.
If it ain't broke, I can fix that.
Monte Heeren
Frequent Advisor

Re: Copy Tape to Tape

Still having problems.
I have 3 files on tape one /dev/rmt/0m.
Trying to copy to tape two /dev/rmt/1m.

Did:
mt -f /dev/rmt/0m rew
mt -f /dev/rmt/1m rew

dd if=/dev/rmt/0mn of=/dev/rmt/1mn bs=10

mt -f /dev/rmt/1m rew
tar -tvf /dev/rmt/1m

Get this error: Tar tape block size error
Not sure what I'm doing wrong.

Monte

A. Clay Stephenson
Acclaimed Contributor

Re: Copy Tape to Tape

That stupid computer did just what you told it to:
dd if=/dev/rmt/0mn of=/dev/rmt/1mn bs=10
should be:
dd if=/dev/rmt/0mn of=/dev/rmt/1mn bs=10k

If it ain't broke, I can fix that.
Monte Heeren
Frequent Advisor

Re: Copy Tape to Tape

That was it! Ding Ding Ding!
I wasn't placing the k on bs=10k.

Don't understand why I have to use no rewind on both tapes?
Monte Heeren
Frequent Advisor

Re: Copy Tape to Tape

Can I copy from tape to tape if using fbackup on the original tape? Will the dd command still work?

Monte
A. Clay Stephenson
Acclaimed Contributor

Re: Copy Tape to Tape

You run the mt -f xxx rew command to position the tape at the beginning (it should already be there after an ejection) but the rewind can never hurt.

If there is but one image on the medium then you can use the rewind device nodes BUT if there are multiple images on the medium then you want to leave the tape positioned exactly where the last operation finished on both the source and destination drives so that subsequent images are correctly handled.
If it ain't broke, I can fix that.
Monte Heeren
Frequent Advisor

Re: Copy Tape to Tape

Thank you to all who responded:
Steven
Melvyn
A.Clay
LNassar

I've found the answer.

Closing thread.
Monte