Operating System - HP-UX
1834189 Members
2824 Online
110064 Solutions
New Discussion

Re: copy directory to remote host

 
PiyuT
Occasional Advisor

copy directory to remote host

dear all,

i'm newbie in hp-ux.I want to copy directory (directory size up to 90 GB)to remote host.what can i do ??i try to copy with ftp but i can't, an error is "not plain text".

thx,
16 REPLIES 16
bhavin asokan
Honored Contributor

Re: copy directory to remote host

hi,

i think it is better to tar the folder ,ftp the tar file to remote host,untar it.

regds,
Robert-Jan Goossens
Honored Contributor

Re: copy directory to remote host

Is it a one time job ?

# find /dir | cpio -o | remsh server " cd /copy ; cpio -idum "

90 GB is large, a tar to tape and a restore from tape could even be faster.

Regards,
Robert-Jan
Bill Hassell
Honored Contributor

Re: copy directory to remote host

90 Gb is massive, not something you would ever transfer over a network with a simple copy. Unless you have gigabit LAN connections between the two machines, it will take many, many hours (5 hours on a 100Mbit LAN). ftp in HP-UX does not have the error message "not plain text" so you need to explain how you are using ftp (command line? some special GUI interface? remote system is not HP-UX?).

As mentioned, 90Gb will be transferred much faster using a tape unless the remote machine is in another city.


Bill Hassell, sysadmin
Peter Godron
Honored Contributor

Re: copy directory to remote host

Hi,
as suggested use a tape backup.
May be workwhile compressing the data beforehand to cut down on the number of tapes.
Regards
Geoff Wild
Honored Contributor

Re: copy directory to remote host

You will have to archive it with either tar or fbackup...after that, ftp the archive (or rcp)...

Where is remote host? if WAN - then that will take a long time...

RGds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
PiyuT
Occasional Advisor

Re: copy directory to remote host

thanks for all,

this situation is that we want to upgrade application and we must to backup for application and database.one server for application and the other for database.backup is for rollback if upgrade is failed.so we make two backup, one on tape and the other on disk (copy disk to disk).remote host in same lan but different subnet.please give me some command that can help me!!
Nguyen Anh Tien
Honored Contributor

Re: copy directory to remote host

I recommend you use rcp. these are steps:
on server you want to copy to:
#login as user who want to copy.
#vi ~.rhost
user IP of server you copy from.
#rcp IPserver:/path/file /path/file_onlocal.
HTH
tienna
HP is simple
KapilRaj
Honored Contributor

Re: copy directory to remote host

I normally use the folllowing method

source node :-

cd $DIR;tar cvf - .|remsh "(cd $DIR;tar xvf -)"

Regds,

Kaps
Nothing is impossible
PiyuT
Occasional Advisor

Re: copy directory to remote host

when i run rpc ip_addressremote:/sourdir /dest_dir, there is an error rpc not registered. ????
PiyuT
Occasional Advisor

Re: copy directory to remote host

dear all,

i use exportfs.
in server that directory will be backup(ip=10.10.x.x), i am add directory name in /etc/exports:
#vi /etc/exports
/apps11i -anon=0
#exportfs -a
#exportfs

than in remote host:
#mount -F nfs 10.10.x.x:/apps11i /data/apps11i

is it true ???is backup is success??
V. Nyga
Honored Contributor

Re: copy directory to remote host

NO!

You only 'see' the datas!

You still should create a tar-file, compress it (gzip) and copy it to the remote host. Only thing - you don't need rcp or ftp now.

HTH
Volkmar
*** Say 'Thanks' with Kudos ***
Geoff Wild
Honored Contributor

Re: copy directory to remote host

Well - with NFS - you can just copy from the NFS mounted file system to the new one:

vxdump -0 -f - -s 1000000 -b 16 /data/apps11i | (cd /newmountpoint ; vxrestore rf -) &

That should work - will be a bit slow as you are using NFS... /newmountpoint is the location of the new filesystem for your data.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Stephen Keane
Honored Contributor

Re: copy directory to remote host

Be careful

rcp = remote copy
rpc = repote procedure call

You needed rcp, the error you posted is from rpc.
PiyuT
Occasional Advisor

Re: copy directory to remote host

i'm sorry,

that i know, vxdump is to dump in tape.i want to copy to disk in another host in same LAN(same building & floor) and to onother LAN (different building).there are many another application that run when i want to copy.i'm afraid, when i'm copy data,will be need more bandwith and cause the other application will run more slowly.help me please!!
Nguyen Anh Tien
Honored Contributor

Re: copy directory to remote host

Hi Piyut
Ftp said "not plain text" it means you folder contain binary file. In you putting (or getting) scipt you must set binary mode for this file by issue bin command
ftp> bin.
and then excute you download or up load command.
Tienna
HP is simple
TwoProc
Honored Contributor

Re: copy directory to remote host

Piyu, the cpio command (above in another message) using remsh will do the trick for you. However, it *will* load up your network and probably slow down other users. Well, if you can't do that - you've got just two alternatives that I can think of ...
a) build a LAN just for administration (VLAN if you will) that won't impact the other network users. That is, separate networking hardware, cards, etc. that you can use to sling stuff around and not hurt production performance.
b) Use Tape.
We are the people our parents warned us about --Jimmy Buffett