Operating System - HP-UX
1748110 Members
4000 Online
108758 Solutions
New Discussion юеВ

How to copy the data from one hpux server to another hpux server

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

Re: How to copy the data from one hpux server to another hpux server

Hi James,

When doing untar, it is over writing the files available in destination.


When we use the options "--keep-old-files" with tar, it is just checking parent directory and skips that directory if it is avilable in destination.

But I would want tar to check the sub-directories and fiels.

Is it possible.
Steven E. Protter
Exalted Contributor

Re: How to copy the data from one hpux server to another hpux server

Shalom,

tar man page answers this:

w Cause tar to print the action being taken, followed by the name of the file, then wait for the user's confirmation. If the user answers y, the action is performed. Any other input means "no".

In a test environment try the w parameter.

What should happen is overwrite warnings should display and the input to the yes/no prompt should be no.

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
senthil_kumar_1
Super Advisor

Re: How to copy the data from one hpux server to another hpux server

-w switch is not working.

I have checked that.
Steven Schweda
Honored Contributor

Re: How to copy the data from one hpux server to another hpux server

> When we use the options "--keep-old-files"
> with tar, it is just checking parent
> directory and skips that directory if it is
> avilable in destination.

Evidence? (Actual commands? Actual output?
Please don't tell me what you think is
happening. _Show_ me what you did, and what
happened when you did it. Then we _both_
can try to decide what is happening.)

It seems to work as expected for me:

dyi # gtar cfv gtt.tar itrc
itrc/
itrc/makefile
itrc/makefile2
itrc/cst.c
itrc/cst

dyi # mkdir itrc2
dyi # cd itrc2

dyi # gtar -x -v --keep-old-files -f ../gtt.tar
itrc/
itrc/makefile
itrc/makefile2
itrc/cst.c
itrc/cst

dyi # rm itrc/cst.c itrc/makefile2
dyi # gtar -x -v --keep-old-files -f ../gtt.tar
itrc/
itrc/makefile
gtar: itrc/makefile: Cannot open: File exists
itrc/makefile2
itrc/cst.c
itrc/cst
gtar: itrc/cst: Cannot open: File exists
gtar: Exiting with failure status due to previous errors

dyi # ls -lR
total 0
drwxr-xr-x 2 root sys 96 Feb 11 01:57 itrc

./itrc:
total 192
-rwxr-xr-x 1 root sys 70220 Nov 1 2008 cst
-rw-r--r-- 1 root sys 142 Nov 1 2008 cst.c
-rw-r--r-- 1 root sys 68 Oct 28 2008 makefile
-rw-r--r-- 1 root sys 106 Oct 28 2008 makefile2


For the record:

dyi # uname -a
HP-UX dyi B.11.31 U ia64 4235313755 unlimited-user license

dyi # gtar --version
tar (GNU tar) 1.22
[...]

You're allowed to provide more details than
"hpux server", too.
Steven E. Protter
Exalted Contributor

Re: How to copy the data from one hpux server to another hpux server

Shalom again,

More details as noted in the prior host would be very useful.

Note that gtar is going to behave differently than tar. gtar is going to behave more like Linux tar and that might let you use the options you are trying to use.

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
James R. Ferguson
Acclaimed Contributor

Re: How to copy the data from one hpux server to another hpux server

Hi (again) Senthil:

Sometimes the best way to answer a question is to answer it yourself by experimenting.

Create a test directory; populate it with a few files; set their modes and ownership to different values and copy those files to another server using various methods and tools.

Regards!

...JRF...