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:
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:
Initiating from the Host to Virtual PC
Create a profile
C:\> Unison
- image003.png:
This writes a config file in C:\Documents And Settings\Martin Cleaver\.unison
- image004.jpg:
Start the server on the virtual host:
- 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:
Initial Sync after having made one change
- image010.jpg:
- image012.jpg:
Making a conflict
- image014.jpg:
- image016.jpg:
Unison refuses to merge when it does not have a means for this file.
- image018.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
- 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.
- Debug = verbose
- image022.jpg: