Operating System - HP-UX
1751807 Members
3342 Online
108781 Solutions
New Discussion юеВ

Make a tar to a remote tape.

 
Rui Vilao
Regular Advisor

Make a tar to a remote tape.

Greetings,

I have an HP-UX box connected to DLT drive.
I would like to store on tape the content of some directories of a remote HP-UX box via tar.

How can I achieve this?

Any help/suggestion is highly appreciated.

Thanks in advance for your help!

Kind Regards,

Rui.
"We should never stop learning"_________ rui.vilao@rocketmail.com
9 REPLIES 9
Pete Randall
Outstanding Contributor

Re: Make a tar to a remote tape.

MANOJ SRIVASTAVA
Honored Contributor

Re: Make a tar to a remote tape.

Rui


You cannot remote mount a tape drive , so either you can remote mount the fielsystem ( too slow ) or use stuff like fback which can access the remote tape drive .

Try using fbackup .

Manoj Srivastava
Tom Danzig
Honored Contributor

Re: Make a tar to a remote tape.

You could do something like:

/usr/bin/tar cvbf - ./ | remsh dd of=/dev/rmt/0m obs=32k"

Assumes /dev/rmt/0m is the correct tape device on the remote server. You will need to be able remsh to the other host. Add the source hostname to the appropriate user .rhosts file on the remote host to allow it.
Brian M Rawlings
Honored Contributor

Re: Make a tar to a remote tape.

Rui: check out the link Pete referenced, you will see that tar over LAN has subtle issues that discourage its use. Little things like undetectable data corruption can ruin your whole day.

I suggest fbackup (as most do for this function). Try the command line below and see if it works for you.

remsh "/usr/sbin/fbackup -f :/dev/rmt/ -i . -0 -v" > /tmp/fbackup.out 2>&1

The tape won't be in 'tar' format, but fbackup and frestore exist on each and every HP-UX system on which you might care to read the tape...

Regards, --bmr
We must indeed all hang together, or, most assuredly, we shall all hang separately. (Benjamin Franklin)
Rui Vilao
Regular Advisor

Re: Make a tar to a remote tape.

Hi, Thanks to all.

I have tried on host2:

# tar cvf - /opt/nap2.1 | remsh host1 "cat - | dd of=/dev/rmt/2m bs=10k"

On host1:

# tar tvf /dev/rmt/2m
Tar: tape blocksize error

Looks the blocksize is wrong...
The DLT tape is ok, because it worked with local tars...

TIA,

Regards,


Rui.
"We should never stop learning"_________ rui.vilao@rocketmail.com
Sachin Patel
Honored Contributor

Re: Make a tar to a remote tape.

Hi Rui,
I don't think you can read dd tape using tar.
you are writing tape using dd command and trying to read using tar.

use fbackup if you are going to read this tape on another hp system.

#fbackup -i /source_dir -f rem_system:/dev/rmt/1m

Thanks
Sachin
Is photography a hobby or another way to spend $
harry d brown jr
Honored Contributor

Re: Make a tar to a remote tape.

Get GNU tar:

http://hpux.connect.org.uk/hppd/hpux/Gnu/tar-1.13.25/


live free or die
harry
Live Free or Die
Ted Ellis_2
Honored Contributor

Re: Make a tar to a remote tape.

to read the tape, use the dd command in reverse:

dd if=/dev/rmt/2m bs=10k | tar -tvf -

should work just fine... I have used this before.

Ted
Dr. Declan Forde
New Member

Re: Make a tar to a remote tape.

Hi Rui
Harry D. Brown Jr. Suggested using GNU tar.
With gtar-1.12 this works fine using the following command where the -f file option is set to RemoteMachine:Raw_Device.

tar-1.12 -cvf zeus:/dev/rmt/0m files

You can even use the following for a particular user

tar-1.12 -cvf user1@zeus:/dev/rmt/0m files

The user needs to be able to remsh to the remote machine with the tape drive.

Note: Gnu tar 1.12 does not support files greater than 2GB :-(

GNU tar-1.13 does support large files >2GB :-) but unfortunately the remote part doesn't seem to work - I keep getting 'unknown host errors'
:-(

I suppose I'll have to download the latest gtar and give it a try.