Operating System - HP-UX
1834914 Members
2860 Online
110071 Solutions
New Discussion

using tar to backup and send files to a remote host

 
SOLVED
Go to solution
stevegray
Frequent Advisor

using tar to backup and send files to a remote host

Second time posting. I cannot find the first one.

I have 8 K servers that need to be backed up. The DLT tape
drives are failing and the company does not want to spend the money
to get them fixed..

The K servers are running 11.00 and 11.11.

I am using tar and trying to send the output to the remote host
which is an rx8640 running 11.31.

The IP is in the /etc/hosts file. I can ping it and use telnet.

The command I am running (logged in as root):

tar -cvf 10.111.2.8:/backups/sleepy.TAR `cat bklist.May1607-064810`

I am getting the error:

tar: cannot open 10.111.2.8:/backups/sleepy.TAR

Did I miss something??

Thanks
Steve
12 REPLIES 12
Pete Randall
Outstanding Contributor
Solution

Re: using tar to backup and send files to a remote host

Your original posting went into Linux > Servers:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1127992

You can find your questions quite easily by clicking on your username to bring up your profile:
http://forums1.itrc.hp.com/service/forums/publicProfile.do?userId=CA1450221&forumId=1

Then click on the link "my questions" to bring up this page:

http://forums1.itrc.hp.com/service/forums/pageList.do?userId=CA1450221&listTyp
e=question&forumId=1

Of course you could also make note of which forum you are posting to at the time of posting - that might be even easier.


Pete



Pete
stevegray
Frequent Advisor

Re: using tar to backup and send files to a remote host

Thanks Pete.

I have deleted that one.
Pete Randall
Outstanding Contributor

Re: using tar to backup and send files to a remote host

Oops, make that Linux > Networking.

Also the URL for "my questions" got split - i t should be:

http://forums1.itrc.hp.com/service/forums/pageList.do?userId=CA1450221&
;listType=question&forumId=1


Pete

Pete
Steven Schweda
Honored Contributor

Re: using tar to backup and send files to a remote host

Which "tar" are you using? Is there anything
in its documentation which suggests that
"f host:path/file" is acceptable?

Curiosity:

If "[t]he IP is in the /etc/hosts file", then
why are you using the address instead of the
name?

> I am using tar and trying to send the
> output to the remote host [...]

To do what with it? Have you considered
using a pipeline with rsh/ssh remote_host to
do whatever on the remote host?

GNU "tar" offers "rmt" support, which could
be useful:

http://www.gnu.org/software/tar/
stevegray
Frequent Advisor

Re: using tar to backup and send files to a remote host

I did not anything in the man page. I just assumed it would work.

I can use the IP address not the name. I have
not figured that out yet.

The tar file is to big for the K servers. I have no more disk space left. I am using the rx8640 since it has over 2TB of space. I want the rx8640 backup to backup those tar files.

Steve
Steven Schweda
Honored Contributor

Re: using tar to backup and send files to a remote host

> I want the rx8640 backup to backup those
> tar files.

There's an almost unlimited number of ways to
do something like this. Probably the easiest
method would be to use NFS. Export the file
systems to be backed up, mount them on the
system with the working tape drive, and do
the "tar" to tape there. The details depend
on how you arrange the NFS stuff.

> I just assumed it would work.

Great.

> I can use the IP address not the name. I
> have not figured that out yet.

I have not yet figured out what that means.
Steven Schweda
Honored Contributor

Re: using tar to backup and send files to a remote host

Or, if you want to leave the "tar" archives
on disk instead of tape, you could do that
with the NFS scheme, too. And you could
compress the stuff as you do it, by piping
it through gzip or bzip2. Many things are
possible. Knowing what you actually want to
do and the capabilities of your tools can be
helpful.
stevegray
Frequent Advisor

Re: using tar to backup and send files to a remote host

All I want to do is to have the output of tar goto the remote host.

Thanks
Steve
Steven Schweda
Honored Contributor

Re: using tar to backup and send files to a remote host

> All I want to do is to have the output of
> tar goto the remote host.

That's not _all_ you want. "All [you] want"
would include whether you want disk or tape
as the destination. Either is possible, but
the details differ.

Depending on the missing details, NFS is
probably the key to the easiest solution. I
assume that if you already used NFS, this
would be obvious, so I deduce that you don't
currently use NFS. This suggests that some
reading will be required. (Or that a more
complete description of the problem and the
constraints is in order.)
stevegray
Frequent Advisor

Re: using tar to backup and send files to a remote host

No help.
Steven Schweda
Honored Contributor

Re: using tar to backup and send files to a remote host

> No help.

You can say that again. Or did you mean that
_you_ didn't get any help?
TwoProc
Honored Contributor

Re: using tar to backup and send files to a remote host

Assuming you've got ssh running between the two hosts, and you've got them authenticating without passwords...

Example 1 (a pull):
From the destination machine (where you want the tar to land)

> cd /destdir
> ssh source_machine "cd /sourcedir ; tar cvf - . " | tar xvf -

Example 2 (a push):
From the source machine (where you are getting the tar from )
> cd /sourcedir
> tar cvf - . | ssh dest_machine "cd /destdir; tar xvf - "
We are the people our parents warned us about --Jimmy Buffett