1

I am using Unison to sync files between multiple servers. The exact command that I am running is:

/bin/unison-text-2.40 /etc/asterisk/dynamic_configs ssh://filesync/opt/dynamic_configs -batch -confirmbigdel=false -force newer -times

I have it set up this way so that any server can make a change to a file and then have all the other servers "in the cluster" get an update. So if ServerA deletes a file then it gets deleted on ServerB, ServerC etc. I have a cron job on every box that runs this script every minute to sync their configurations. I have 10 servers of which 5 of them are throwing the error below

    Looking for changes
    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 unison-users@yahoogroups.com (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/user/.unison
     and have names of the form
       arXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
     where the X's are a hexidecimal number .
  c) Run unison again to synchronize from scratch.

What is the correct way to fix this? I am syncing a few directories so I don't want to remove all of the content in ~/.unison. I do know which file in ~/.unison is responsible for this directory

[root@mp1-nyc1 .unison]# ll
total 252
-rw------- 1 user user   8530 Feb 15 10:02 ar2223c1cdad791fd3b63d47747cef6bb6
-rw------- 1 user user  75701 Feb 17 12:40 ar347b0a3f8cb288e9f59e66e952f4ce38
-rw------- 1 user user   4595 Feb 17 04:59 ara01ec9241285b8afccd32b051233ba2d
-rw------- 1 user user 138468 Feb 16 21:45 ard15c71a6505af1748d399a34104be1fd
-rw------- 1 user user     26 Feb 11 22:32 default.prf
-rw------- 1 user user     34 Feb 15 10:03 fp2223c1cdad791fd3b63d47747cef6bb6
-rw------- 1 user user     34 Feb 17 15:20 fp347b0a3f8cb288e9f59e66e952f4ce38
-rw------- 1 user user     34 Feb 17 15:20 fpa01ec9241285b8afccd32b051233ba2d
-rw------- 1 tuser user     34 Feb 17 15:20 fpd15c71a6505af1748d399a34104be1fd

[root@mp1-nyc1 .unison]# grep dynamic_configs * 
Binary file ar2223c1cdad791fd3b63d47747cef6bb6 matches
[root@mp1-nyc1 .unison]# 

In the past I simply deleted the binary file for that directory in my server and the unison server and it seemed to work however there were issues in the past with files "going missing". Is there any way to tell unison to ignore what I have and just grab everything fresh from the main server?

Dovid Bender
  • 397
  • 1
  • 6
  • 16

0 Answers0