1844038 Members
2314 Online
110227 Solutions
New Discussion

tar problem

 
Tarek
Super Advisor

tar problem

hi all,
i'm trying to copy a user's area from one ws to another. The area is about 3 GB.
Usually i use the following command (it always works, also with greater areas):
tar cf - directorytocopy | remsh new-ws '(cd /local_user ; tar xvf - )'
The copy begins and after a few minutes it stops and i'm having the following error message on the ws where i do the tar command:
connection reset by a peer. connection closed.
What does it mean? No other root is killing or closing my tranfer. Could it be a network problem?? What should i do?
Thanks & regard
18 REPLIES 18
Rita C Workman
Honored Contributor

Re: tar problem

I guess it's a matter of choice, but have you tried just doing an ftp or something I like to use:
rcp for remote copy. Just set up an .rhosts file on the remote system and you can then do the remote copy

rcp -p -r /dir/all_dir&files_here remote_host:/thisdir/

Just a thought,
/rcw

-p maintains file permissions/ownership
-r copy all files and directories
Paula J Frazer-Campbell
Honored Contributor

Re: tar problem

Hi
Does the are have a file over 2Gb in size? if so tar has a problem.

If you do have a 2Gb + file will it zip below 2Gb?

Paula
If you can spell SysAdmin then you is one - anon
Paula J Frazer-Campbell
Honored Contributor

Re: tar problem

Hi
Info on Tar and file size:-

http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xe29d0559ff7cd4118fef0090279cd0f9,00.html

Paula
If you can spell SysAdmin then you is one - anon
Paula J Frazer-Campbell
Honored Contributor

Re: tar problem

Hi

A possible fix to to NFS export from the source machine and them mount it on the target machine.

then cd to mounted dir
find .|cpio -pudvm /

Paula
If you can spell SysAdmin then you is one - anon
Tarek
Super Advisor

Re: tar problem

i did a tar and not an rcp because i have to maintain links...
there aren't files greater that 2 gb....because as filesystem i didn't set the largefiles option..
Paula J Frazer-Campbell
Honored Contributor

Re: tar problem

Hi
Can you telnet to the destination workstation? and does it stay up?

Paula
If you can spell SysAdmin then you is one - anon
Tarek
Super Advisor

Re: tar problem

yes i can telnet and connection didn't fall....
the 2 ws has different O.S. One is 10.20 and the other in 11.00.
I saw your description to mount nfs and then do cpio...does it maintain links?? i never used cpio, can you make me an example please...
Paula J Frazer-Campbell
Honored Contributor

Re: tar problem

Hi
As one has 10.20 and the other 11.00 there is a difference in nfs and the connection is very weak/slow.

Suggestions:-

Tar the files up locally and then ftp the tar file to the target machine. This will work providing you have the space on the source machine.

Thanks for the points that gave me my wizards hat ;-)

Paula
If you can spell SysAdmin then you is one - anon
Tarek
Super Advisor

Re: tar problem

I thought about that, but unfortunately i don't have enough space to do the tar...
the only way is to do the tar on a tape, right?? In this mode, i have to go to the place where ws is, mount the DAT, do the tar, go to the other ws and so forth..it will be very long and boring...there isn't another way??
Pedro Sousa
Honored Contributor

Re: tar problem

Just to inform you of a good archiving solution.
You can use "ar" to create portable archives (it's similar to the old "arj" in MS-DOS).
good luck.
Vincenzo Restuccia
Honored Contributor

Re: tar problem

tar cvf file.tar /path/*,compress of file.tar, ftp of file.tar.Z in remote host.
Tarek
Super Advisor

Re: tar problem

Vincenzo..i can't create the tar file on the local host and then ftp it, becuase i don't have enough space.
I'm try to do this:
tar cf - file | remsh ws '(cd / ; tar xvf -)'
but i'm having that strange error..connection closed by a peer..
this command works on all ws, unless on this. do i have to configure something because it works??
Thomas Kollig
Trusted Contributor

Re: tar problem

Why don't you export your target directory via nfs to your source workstation, thus you don't need to do a remsh in your command?

Bye, Thomas
Robert O'Brien
Occasional Contributor

Re: tar problem

Have you tried using tar to tape at all? tar will prompt you for more tapes if necessary. Writing to tape should be at least as quick as what you've been trying.

Other possible solution is to
tar cvf - mydir | gzip -9 -c mydir.tar.gz

HTH
-rob-
ask a question and look stupid for 5 minutes. Don't and remain stupid for life.
Robert O'Brien
Occasional Contributor

Re: tar problem

hi again
I've just had a look again at the thread and thought I should explain myself better. If you only have to do this for one user, mounting the tape, doing the tar and restoring on one system would probably have taken less time than you've spent on the problem so far. If you have lots of users, this is not a good way to go.

Using tar cvf - mydir | gzip -9 -c > mydir.tar.gz will not create a large intermediary file on current disk. I believe /tmp will be used by gzip

But getting back to the original problem of "connection reset...", my own experience of HP's NFS has not been great. I run nightly builds using NFS mounted disks and HP build takes 3-4 times longer that Solaris build. I know the machines are different, but have tried builds to local disks in other jobs and seen similar performance from HP NFS.

regards
-Robert-
ask a question and look stupid for 5 minutes. Don't and remain stupid for life.
Tarek
Super Advisor

Re: tar problem

Thomas you say:
mount from the new ws the directory i want to copy...so then i will do a local copy and not a remote one...
that will be possible..i will try..
I know it is possible to do tar on tape, but it is longer..i'm working remotely...if i have to use tape, i have to go to the ws, mount the tape, do the tar, go to the new ws and so....
it will be very long...here is a big place..i don't have ws in the same place..they are in different buildings...
however if nfs doesn't work...i will use tape...
thanks all again
regards
tarek
Tarek
Super Advisor

Re: tar problem

Robert...it's not an urgent thing to do. Of course if it was..i used the tape..but i wanted to know why only on this ws the tar with remsh failes and gives me that output error. Then, this way is very fast to do...i have just to give a command..and then it will automatically do everything !!!
Thanks.
Thomas Kollig
Trusted Contributor

Re: tar problem

Hi again!

Some questions which may help:

Have you compared /etc/inetd.conf files on your workstations? Are there any differences for remshd?
Are you using the same shell on each workstation?

Bye, Thomas