1832534 Members
7154 Online
110043 Solutions
New Discussion

Re: tar network data

 
SOLVED
Go to solution
j773303
Super Advisor

tar network data

How do backup host A /data/* to host B tape drive by use tar command?
Assume B has connect a TAPE drive.
Hero
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: tar network data

1) You can't write directly to the tape drive on host B.

Few ways to get the data over there.

If host be is running nfs, you can mount a folder where you'd have read/write capabilities. Lets call it /tmp/tar

mount hostb://tmp/tar /hostb

A folder in root named /hostb must exist.

then

tar xvf /hostb/file.tar *

Alternative:

tar xvf /tmp/file.tar

scp -p /tmp/file.tar hostb://tmp/tar

rcp will also work if you are using it.
scp requires Secure Shell and public keys exchanged to work without a password change.

Let me know if you need more detail.

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
Steven E. Protter
Exalted Contributor

Re: tar network data

Note corrections to my original post.

1) You can't write directly to the tape drive on host B.

Few ways to get the data over there.

If host be is running nfs, you can mount a folder where you'd have read/write capabilities. Lets call it /tmp/tar

mount hostb://tmp/tar /hostb

A folder in root named /hostb must exist.

then

tar cvf /hostb/file.tar *

Alternative:

tar cvf /tmp/file.tar

scp -p /tmp/file.tar hostb://tmp/tar

rcp will also work if you are using it.
scp requires Secure Shell and public keys exchanged to work without a password change.

Let me know if you need more detail.

SEP

Apologies for the pea brain molecule(brain) freeze.
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
Michael Tully
Honored Contributor
Solution

Re: tar network data

Try these:

# tar cvf - /data/* | remsh hostname dd of=/dev/rmt/0m

or

# cd /data
# tar cvf - . | remsh hostname dd of=/dev/rmt/0m

which will backup the current directory.

or

# remsh hostname "dd if=/dev/rmt/0m bs=10k" | tar xvf -

'hostname' is the hostname of the machine with the tape drive.
Anyone for a Mutiny ?
malay boy
Trusted Contributor

Re: tar network data

Hi ,
fbackup allow you to do a this kind of backup.

Here are the bit of man pages on fbackup option -f :

There is slightly different behavior if remote devices
are used. A device on the remote machine can be
specified in the form machine:device. fbackup creates
a server process from /usr/sbin/rmt on the remote
machine to access the tape device. If /usr/sbin/rmt
does not exist on the remote system, fbackup creates a
server process from /etc/rmt on the remote machine to
access the tape device. Only magnetic tapes can be
remote devices. When remote DDS tape devices are used,
the fast search marks capability is not used.

I done it a couple of years ago and if i was not mistaken you need to setup the rhost only.
If my pee-wee brain remember correctly.

Hope this help.

regards
mB



There are three person in my team-Me ,myself and I.