Operating System - HP-UX
1753946 Members
7902 Online
108811 Solutions
New Discussion юеВ

Re: Transfer files between two systems

 
SOLVED
Go to solution
Marcel Boon
Trusted Contributor

Transfer files between two systems

Hi,

What is the savest and fastest way to transfering files (one dir) between two systems?
HP-UX 10.20 10mb network.

Marcel
See the man pages
6 REPLIES 6
melvyn burnard
Honored Contributor

Re: Transfer files between two systems

Depending upon what you are trying to acheive, you could look at:

ftp
rcp
NFS mounted file systems

I would suggest first look at rcp, then ftp, using man pages.

For further information, you could visit:
http://www.docs.hp.com
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
CHRIS ANORUO
Honored Contributor

Re: Transfer files between two systems

Use rcp -p -r originating_server:/directory target_server:/directory.
Update /.rhosts file with the server name and user name.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Andreas Voss
Honored Contributor
Solution

Re: Transfer files between two systems

Hi,

first check access permissions on destination system:
remsh who
If you get remshd: Login incorrect.
You have to create/edit $HOME/.rhosts at the destination system:
Add a line with the source systen hostname.
Then remsh should work.
To copy a directory (with all subdirs):
cd
find . -depth | cpio -ocB | remsh "cd ; cpio -imdvcB"
This will copy all the files with the benefit that all file attributes are set at the destination system equal to the source system.

Cheers

Andrew
Dave Wherry
Esteemed Contributor

Re: Transfer files between two systems

As the posts said ftp, rcp they all work great. Your trade-offs are with rcp you need to open up the systems some with you .rhosts and hosts.equiv and such. If security is not that big of an issue with you rcp is very nice.
ftp is a little more secure as it requires interaction, but, can be scripted. Of course then you have an id and password in the script. You can work around that, it just takes a little more work.
Will you be doing the copies on a frequent basis? That will help determine what process you use. There is another process which I have looked at, but, honestly never tried. rdist. It is documented in the Internet Services, Installing and Administering Guide. You create a list of files on a master system that you want to have copied to other systems. Any time one of those files changes it gets copied out to the other system(s). If you need that type of functionality rdist looks very interesting. It's all automatic.
Alan Riggs
Honored Contributor

Re: Transfer files between two systems

rdist is an excellent tool if you have directories or files that you need to keep synchronized across servers. It is fairly simple to set up a basic distfile.
Shannon Petry
Honored Contributor

Re: Transfer files between two systems

Many variables determine what you SHOULD use.
First, is this frequent, or infrequent activity. Is this common activity, but not necessarilly shared data? or Is is data that needs to be shared? Is it backup data?

If this is infrequent (occasionally having to copy a file) save the security headache's and FTP the data needed. FTP allows put and get of multiple files in the same directory, so should be enough.

If this is more common, look at using either a $HOME/.rhosts or /etc/hosts.equiv, and rcp'ing the data.

If this is backup copy, or data that needs to be in two locations at the same time, rsync or rdist are good choices, with one large note. root should not be allowed to run rdist! Users should use rdist, or rsync and Never root!

If this is data that does not have to be in two locations, but used by two or more locations, then NFS is the best choice. Data can sit on a server, but clients access data as if it were local. If you are new to HP-UX, SAM does a pretty good job of helping you set up NFS client and server.

Best of luck!
Microsoft. When do you want a virus today?