I am trying to keep in sync three machines, on one of which I run unison to sync the other two. This 'star' architecture is advertised in the unison manual:
Using Unison to Synchronize More Than Two Machines
Unison is designed for synchronizing pairs of replicas. However, it is possible to use it to keep larger groups of machines in sync by performing multiple pairwise synchronizations.
If you need to do this, the most reliable way to set things up is to organize the machines into a “star topology,” with one machine designated as the “hub” and the rest as “spokes,” and with each spoke machine synchronizing only with the hub. The big advantage of the star topology is that it eliminates the possibility of confusing “spurious conflicts” arising from the fact that a separate archive is maintained by Unison for every pair of hosts that it synchronizes.
But, after initial sync with
unison -fat -batch "$HOME/dir" ssh://"$myhost1//dir"
unison -fat -batch "$HOME/dir" ssh://"$myhost2//dir"
for both hosts I always get the following error for one of them:
Fatal error: Internal error: On-disk archives are not identical.
This can happen when both machines have the same hostname.
If this is not the case and you get this message repeatedly, please: a) Send a bug report to [email protected] (you may need to join the group before you will be allowed to post). b) Move the archive files on each machine to some other directory (in case they may be useful for debugging). The archive files on this machine are in the directory /home/andreas/.unison and have names of the form arXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX where the X's are a hexidecimal number . c) Run unison again to synchronize from scratch.
If I follow the instructions b), or if I run
unison -ignorearchives -fat "$HOME/dir" ssh://"$myhost1//dir"
I sync this one successfully. But then snycing the other one will yield the same error above. It seems that whenever I sync one of them the other one will be in inconsistent state.
How can I fix this, other than always adding -ignorearchives
? Unison version is 2.40.102 from ubuntu packages and android Unison app.
unison -fat ssh://"$myhost1//dir" "$HOME/dir"
etc. the same issue occurs.Uncaught unix error: read failed: Try again
, so this does not seem to be an option for me either.