Tags:
create new tag
, view all tags

Client-Server vs. Peer to peer

These instructions show client server interaction, with the virtual PC session acting as a long-running server. You could use two PCs or a Windows and a UNIX box.

When unison is run ssh nothing needs to be pre-running on a server side; the initiator runs the server process and the two act as peers.

The instructions I show are for the GUI version, but there is a command line batch version too

I am not clear whether Unison has to have a SSH server for peer-to-peer windows to windows synchronization.

Of particular concern is the issue of naming. I connect our PCs at home in many different ways: WiFi? , Bluetooth, infrared. The IP addresses continually change. And will be different over each transport.

Networking with Virtual PC

You could use two PCs or a Windows and a UNIX box. I used a virtual host on my laptop.

Host:

  • Loopback adapter IP address:
  • Ethernet adapter Local Area Connection 3:
  Connection-specific DNS Suffix  . :
  IP Address. . . . . . . . . . . . : 192.168.131.1
  Subnet Mask . . . . . . . . . . . : 255.255.255.0
  Default Gateway . . . . . . . . . :

Virtual PC:

  • 1 Ethernet adapter :
  IP Address. . . . . . . . . : 192.168.131.66
  Subnet Mask . . . . . . . . : 255.255.255.0
  Default Gateway . . . . . . : 192.168.131.254

Ensuring that I really am hitting the host

From the virtual PC I can hit ...

... and I get the server running on the host

From the host I can hit : http://192.168.131.66/twiki/bin/configure

The virtual host log apache file responds: • 192.168.131.1 - - [23/Jul/2005:22:26:26 +0000] "GET /twiki/bin/configure HTTP/1.1" 200 83561 • 192.168.131.1 - - [23/Jul/2005:22:27:00 +0000] "GET /favicon.ico HTTP/1.1" 404 282

Furthermore, killing the server on the virtual PC and then hitting it from the host renders:

  • image002.jpg:
    image002.jpg

Initiating from the Host to Virtual PC

Create a profile C:\> Unison

  • image003.png:
    image003.png

This writes a config file in C:\Documents And Settings\Martin Cleaver\.unison

  • image004.jpg:
    image004.jpg

Start the server on the virtual host:

  • image006.jpg:
    image006.jpg

Connect to the virtual PC session

C:> unison.exe virtualhost

As this is the first time we have used the profile it shows a message.

  • image008.jpg:
    image008.jpg

Initial Sync after having made one change

  • image010.jpg:
    image010.jpg

  • image012.jpg:
    image012.jpg

Making a conflict

  • image014.jpg:
    image014.jpg

  • image016.jpg:
    image016.jpg

Unison refuses to merge when it does not have a means for this file.

  • image018.jpg:
    image018.jpg

  • image020.jpg:
    image020.jpg

Either TWiki’s merge method or diff3 is probably perfect for conflict resolution

Debugging using Unison

Regular log files

See C:\Documents And Settings\User Name\.unison.log. e.g.:

UNISON started propagating changes at 14:32:21 on 24 Jul 2005
[CONFLICT] Skipping ConflictedTopic.txt
[CONFLICT] Skipping ConflictedTopic.txt,v
[CONFLICT] Skipping changes
[BGN] Copying TestTopic2.txt
  from C:/moreprgs/indigoperl/apache/TWiki/data/Sandbox
  to //Martin Cleaver/c:/indigotwiki/twiki/data/Sandbox
[BGN] Copying TestTopic2.txt,v
  from C:/moreprgs/indigoperl/apache/TWiki/data/Sandbox
  to //Martin Cleaver/c:/indigotwiki/twiki/data/Sandbox
[BGN] Updating file TestTopicXXXXXXXXXX.lease
  from C:/moreprgs/indigoperl/apache/TWiki/data/Sandbox
  to //Martin Cleaver/c:/indigotwiki/twiki/data/Sandbox
[END] Copying TestTopic2.txt
[END] Copying TestTopic2.txt,v
[END] Updating file TestTopicXXXXXXXXXX.lease
UNISON finished propagating changes at 14:32:44 on 24 Jul 2005

Debug modes

  1. Debug = all
Client side:
 unison.exe virtualhost -debug all 

Server side:
Unison –server 52888 –debug all

Both sides will spill tons of information about connecting, comparing, etc.

  1. Debug = verbose

  • image022.jpg:
    image022.jpg
Topic attachments
I Attachment Action Size Date Who Comment
pngpng image001.png manage 7.5 K 25 Jul 2005 - 22:58 MartinCleaver  
jpgjpg image002.jpg manage 8.7 K 25 Jul 2005 - 22:58 MartinCleaver  
pngpng image003.png manage 12.1 K 25 Jul 2005 - 22:59 MartinCleaver  
jpgjpg image004.jpg manage 18.5 K 25 Jul 2005 - 22:59 MartinCleaver  
jpgjpg image006.jpg manage 9.0 K 25 Jul 2005 - 23:00 MartinCleaver  
jpgjpg image008.jpg manage 23.0 K 25 Jul 2005 - 23:00 MartinCleaver  
jpgjpg image010.jpg manage 31.3 K 25 Jul 2005 - 23:01 MartinCleaver  
jpgjpg image012.jpg manage 23.0 K 25 Jul 2005 - 23:01 MartinCleaver  
jpgjpg image014.jpg manage 22.6 K 25 Jul 2005 - 23:02 MartinCleaver  
jpgjpg image016.jpg manage 22.5 K 25 Jul 2005 - 23:03 MartinCleaver  
jpgjpg image018.jpg manage 22.2 K 25 Jul 2005 - 23:03 MartinCleaver  
jpgjpg image020.jpg manage 24.3 K 25 Jul 2005 - 23:04 MartinCleaver  
jpgjpg image022.jpg manage 21.5 K 25 Jul 2005 - 23:04 MartinCleaver  
Topic revision: r9 - 05 Aug 2005 - 20:23:02 - MartinCleaver
Codev.TWikiReplicationWithUnisonGuiExample moved from Codev.ReplicationUsingUnison on 05 Aug 2005 - 20:22 by MartinCleaver - put it back
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback