Operating System - HP-UX
1753865 Members
7535 Online
108809 Solutions
New Discussion юеВ

Re: have problem with tar -xvf

 
Tung_1
Advisor

Re: have problem with tar -xvf

Hi Sani, I use tar like cp command, I have 02 HP-UX 11i v1 server and I want copy 1 directory from Server01 to Server02. I use tar to hold the user, group, permision of this directory not change.

Server01: #tar cvf - ./mydir | gzip > mydir.tar.gz
#rcp mydir.tar.gz Server02:/xxx

Server02: #gunzip mydir.tar.gzip
#tar -xvf mydir.tar
Ganesan R
Honored Contributor

Re: have problem with tar -xvf

Hi,

The patch which you are having is quit old released on 2003. The latest tar cumulative patch is PHCO_36587.

Install this one along with dependencies and see the performance. Hopefully that may solve the issue.
Best wishes,

Ganesh.
Sani
Frequent Advisor

Re: have problem with tar -xvf

Hi Tung ,

as u told it is not the same in every situation , you need to check the utilization of the server at that time.

Steven Schweda
Honored Contributor

Re: have problem with tar -xvf

> Server01: #tar cvf - ./mydir | gzip > mydir.tar.gz
> #rcp mydir.tar.gz Server02:/xxx
>
> Server02: #gunzip mydir.tar.gzip
> #tar -xvf mydir.tar

Not the method I'd use. How many large
temporary files do you want? (You don't
_need_ any.)

( cd /src/path ; tar cf - stuff | gzip ) | \
remsh server2 ' ( cd /dst/path ; gunzip | tar xf - ) '

Variations:

If "/dst/path" doesn't exist, add
"mkdir -p /dst/path ; " before the "cd".

Substitute "ssh" for "remsh"

Add a "v" to one of the "tar" commands".
(With "v" on both "tar" commands, the noise
can be more confusing than helpful.)

> Who can explain it to me ?

Probably no one. Not enough info.
BIHAN
Frequent Advisor

Re: have problem with tar -xvf

Steven Schweda writes :
...
( cd /src/path ; tar cf - stuff | gzip ) | \
remsh server2 ' ( cd /dst/path ; gunzip | tar xf - ) '
...

This is ok but if you have a problem when "cd somewhere" you will untar you files in the wrong directory or send files from a wrong directory or both (dangerous).


so better use && to test the return code

( cd /src/path && tar cf - stuff | gzip ) | \
remsh server2 ' ( cd /dst/path && gunzip | tar xf - ) '



Tung_1
Advisor

Re: have problem with tar -xvf

Thanks guys, maybe i found the answer for my question, it is some paramater when i use SAM to mount a filesystem.
vxfslog,mincache=dsync,blkclear,nodatainlog,largefiles,rw,suid 0 2

After i remount by command is ok.