Operating System - HP-UX
1825715 Members
3011 Online
109686 Solutions
New Discussion

File replicator in HP-UX environment

 
SOLVED
Go to solution
Enrico Venturi
Super Advisor

File replicator in HP-UX environment

Hi all,
I need to build an efficient engine to replicate files fron an active host to a spare one.
So far, we used scripts based on "rcp" command.
Now we want to use a compiled application (written in C or C++), and we want to use HP-UX libraries in order to minimize the time required to replicate the files.
The simplest way is to execute a system("rcp file1 host2:/path/file1") command.
Is there any method more efficient?
I thank you in advance.
3 REPLIES 3
Christopher Caldwell
Honored Contributor
Solution

Re: File replicator in HP-UX environment

rdist is more efficient because you lose some fork/exec/socket setup. Plus, rdist was designed for file replication.

man rdist for details
Enrico Venturi
Super Advisor

Re: File replicator in HP-UX environment

Ok, I'll takeinto account rdist, thanks!
Anyway,
do you think developping a client-server application can result in a faster transfer between the two hosts? In the ideal situation the transfer time cannot be less the transfer rate / file size, isn't it? I'd like to be as closer as possible to it.
Christopher Caldwell
Honored Contributor

Re: File replicator in HP-UX environment

For max control and efficiency, we developed a custom app (client, server) that performs file delivery - that's probably you're best bet. It's fairly trivial.

If you have control of the app that gen's the file in the first place, you can easily effect file delivery by adding some RPC hooks at the end of the delivery process.

Grow your own is fairly painless.