Re: Can tar dupe a tape? (71 Views)
Reply
Advisor
Rhonda Mokri
Posts: 26
Registered: ‎11-10-2005
Message 1 of 5 (71 Views)
Accepted Solution

Can tar dupe a tape?

On a HP-UX11i server, is there a tar command that could be used to create a duplicate of a tape created with tar?

I've been asked to make a copy of a LTO tape to another tape and have not been able to figure out if this is possible and the attempts that I have tried have not been successful. The command 'tar -cvf /dev/rmt/2m /dev/rmt/1m' does not work.

Thanks.
Honored Contributor
Jeff_Traigle
Posts: 1,354
Registered: ‎03-04-2004
Message 2 of 5 (71 Views)

Re: Can tar dupe a tape?

dd is probably your better bet.

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

(Someone can probably pipe in on an appropriate block size for this if the default isn't wise.)
--
Jeff Traigle
Acclaimed Contributor
A. Clay Stephenson
Posts: 17,825
Registered: ‎07-16-1998
Message 3 of 5 (71 Views)

Re: Can tar dupe a tape?

The most straightforward method is to use dd. Assuming the standard 20 512-byte blocking was used to create the tar image then
dd bs=20b if=/dev/rmt/2m of=/dev/rmt/1m
should do the job.

Man dd for details.


If it ain't broke, I can fix that.
Advisor
Rhonda Mokri
Posts: 26
Registered: ‎11-10-2005
Message 4 of 5 (71 Views)

Re: Can tar dupe a tape?

Thanks for the speedy reply to my post. The dd command is working.
Advisor
Rhonda Mokri
Posts: 26
Registered: ‎11-10-2005
Message 5 of 5 (71 Views)

Re: Can tar dupe a tape?

Clay's response with the correct dd statement to use solved my problem.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.