1832284 Members
2337 Online
110041 Solutions
New Discussion

Synchronise file

 
SOLVED
Go to solution
meekrob
Super Advisor

Synchronise file

Hi all ,
i need an information please,
can we do in HP-UX a synchronisation of files or directories ,
for example , if i have two servers , and two files each on one server with the same name , and i make changes to one file and i want that the file on the other server that take the changes automatically also ?
thank's
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Synchronise file

Of course, the easist would be to NFS mount the files so that there would only be set of files and they would also be "in sync".

You can use the rdist utility to copy files from one to the other but it is not automatic. You would have to cron something to periodically sync the files.

You should also look at rsync:
http://hpux.cs.utah.edu/hppd/hpux/Networking/Admin/rsync-2.6.8/

It's smarter than rdist in that it can transfer only portions of changed files.

Really, NFS is the better approach because the changes are instantaneous (well, almost) and you don't have to worry about which copy is the actually the master. Consider what happens when the same file is updated on both hosts at the same time. They contain different data, but which one wins? NFS solves that for you.
If it ain't broke, I can fix that.
IT_2007
Honored Contributor

Re: Synchronise file

yes you can do with rdist command.

also check on rsync utility for how to distribute files globally.
meekrob
Super Advisor

Re: Synchronise file

when i tried to install the rsync , i have the following error :

Agent session started for user "root@scxpdap1.beac.int".
(pid=11104)

* Beginning Analysis Phase.
* Source:
scxpdap1.beac.int:/global/outils/RSYNC/rsync-2.6.8-hppa-11.23-2.depot

* Target: scxpdap1:/
* Target logfile: scxpdap1:/var/adm/sw/swagent.log

* Reading source for product information.
* Reading source for file information.
The corequisite "gettext.gettext-SHLIBS" for fileset
"rsync.rsync-RUN,r=2.6.8" cannot be successfully resolved.
The corequisite "popt.popt-RUN" for fileset
"rsync.rsync-RUN,r=2.6.8" cannot be successfully resolved.
ERROR: The dependencies for fileset "rsync.rsync-RUN,r=2.6.8" cannot
be resolved (see previous lines).
You must resolve the above dependencies before operating on
this fileset or change the "enforce_dependencies" option to
"false".
* Executing preDSA command.

* Summary of Analysis Phase:
ERROR: Exclude rsync.rsync-RUN,r=2.6.8
ERROR: 1 of 1 filesets had Errors.
ERROR: The Analysis Phase had errors. See the above output for
details.

can you have ideas about that
thank you
A. Clay Stephenson
Acclaimed Contributor

Re: Synchronise file

You should have paid attention to the run-time requirements for rsync: gettext, libiconv, libgcc, and popt packages are all required.

Have you solved the synchronization precedence problem yet? If not, installing the software is the easy part. NFS is still the better answer.
If it ain't broke, I can fix that.