[plug] rsync peer to peer style?

James Devenish devenish at cyllene.uwa.edu.au
Thu Jan 16 05:38:49 WST 2003


On Wed, Jan 15, 2003 at 10:05:13PM +0800, Trevor Phillips wrote:
> If I have one file on two machines, and I just want to make sure they're 
> identical (and if there's any problems, fix them), how easy is it to do 
> this with rsync:
>   - without using rsh/ssh
>   - without requiring special account knowledge
>   - with at least one of the two machines being a windows box
> 
> Would it be easy enough to make up a script/alias/batch file to do this? 
>  (One for server, one for client...)

There is a hint of implication in your e-mail that the files could be
modified on either of the machines, so you need a symmetrical method
that was write privileges on both machines. But if you don't want
rsh/ssh or account knowledge -- how do you plan to authenticate
the synchronisation task? Will you have one of the machines mounted
on the other or not? What do you mean by "problems" -- differing
contents, missing file, wrong internal file structure?

Unison, <http://www.cis.upenn.edu/~bcpierce/unison/>, will do what you
describe since it can listen on a TCP port and accept connections from
all and sundry without the need for accounts on the destination host
(and when I say 'destination', I mean in terms of establishing a
connection, rather than the rsync terminology). Unison will, by default,
treat the two computers symmetrically. That is, it is designed for
syncrhonising complete directory structures, such as you might want to
do with your laptop and desktop -- peers -- rather than simply
distributing them from a single source to other destinations like rsync.
So, you would only need a script on one of the computers to create a
bidirectional transaction with unison. It is very easy to "install"
since it consists of just a single executable file.




More information about the plug mailing list