Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I synchronize two folders using Unison, only one of the roots seems to be affected. Below are all the information I would think is necessary to figure out why it is working like it is.

I'm using

$ unison -version
unison version 2.27.57

From the Ubuntu repositories.

My work laptop:

 $ pwd
 $ ls -lAR .unison*
 total 8
 drwxr-xr-x 2 userfoo userfoo 4096 2010-04-26 11:39 backups
 -rw-r--r-- 1 userfoo userfoo  231 2010-04-26 11:38 default.prf

 total 0

 total 0
 $ cat .unison/default.prf 
 # Roots of the synchronization
 root = /home/userfoo/.unisonroot
 root = ssh://devel//home/userbar/.unisonroot

 path = *
 backuplocation = central
 backupdir = /home/.unison/backups
 backupprefix = $VERSION.bak
 $ mkdir .unisonroot/aDirectoryFrom-$UNISONLOCALHOSTNAME
 $ echo something >.unisonroot/aFileFrom-$UNISONLOCALHOSTNAME
 $ ls .unisonroot/
 aDirectoryFrom-worklaptop  aFileFrom-worklaptop

And the Ubuntu server I want to synchronize with:

$ pwd
$ ls -lAR .unison*
total 4
drwxr-xr-x 2 userbar userbar 4096 2010-04-26 11:38 .unison

total 0

total 0
$ mkdir .unisonroot/aDirectoryFrom-$UNISONLOCALHOSTNAME
$ echo something >.unisonroot/aFileFrom-$UNISONLOCALHOSTNAME
$ ls .unisonroot/
aDirectoryFrom-workcmpuserbardevel  aFileFrom-workcmpuserbardevel

I perform the unison synchronization:

$ unison
Contacting server...
Connected [//worklaptop//home/userfoo/.unisonroot -> //workcmpuserbardevel//home/userbar/.unisonroot]
Looking for changes
Warning: No archive files were found for these roots, whose canonical names are:
This can happen either
because this is the first time you have synchronized these roots, 
or because you have upgraded Unison to a new version with a different
archive format.  

Update detection may take a while on this run if the replicas are 

Unison will assume that the 'last synchronized state' of both replicas
was completely empty.  This means that any files that are different
will be reported as conflicts, and any files that exist only on one
replica will be judged as new and propagated to the other replica.
If the two replicas are identical, then no changes will be reported.

If you see this message repeatedly, it may be because one of your machines
is getting its address from DHCP, which is causing its host name to change
between synchronizations.  See the documentation for the UNISONLOCALHOSTNAME
environment variable for advice on how to correct this.

Donations to the Unison project are gratefully accepted:

Press return to continue.[<spc>]   Waiting for changes from server
Reconciling changes

local          workcmps...       
dir      ---->            aDirectoryFrom-worklaptop  [f] 
file     ---->            aFileFrom-worklaptop  [f] 

Proceed with propagating updates? [] y
Propagating updates

UNISON 2.27.57 started propagating changes at 11:49:14 on 26 Apr 2010
[BGN] Copying aDirectoryFrom-worklaptop from /home/userfoo/.unisonroot to //workcmpuserbardevel//home/userbar/.unisonroot
[BGN] Copying aFileFrom-worklaptop from /home/userfoo/.unisonroot to //workcmpuserbardevel//home/userbar/.unisonroot
[END] Copying aDirectoryFrom-worklaptop
[END] Copying aFileFrom-worklaptop
UNISON 2.27.57 finished propagating changes at 11:49:14 on 26 Apr 2010

Saving synchronizer state
Synchronization complete  (2 items transferred, 0 skipped, 0 failures)

And then check the .unisonroot directory on the computer I started the synchronization from:

$ ls .unisonroot/
aDirectoryFrom-worklaptop  aFileFrom-worklaptop

And on the server:

$ ls .unisonroot/
aDirectoryFrom-worklaptop           aFileFrom-worklaptop
aDirectoryFrom-workcmpuserbardevel  aFileFrom-workcmpuserbardevel

As can be seen above, the contents of the laptop .unisonroot has not changed while the servers .unisonroot has. The desired result would have been that the two folders would have ended up being identical, holding the union of the contents of the two roots.

share|improve this question

closed as off-topic by masegaloeh, Scott Pack, Andrew Schulman, EEAA, mdpc Apr 24 '15 at 23:23

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow." – masegaloeh, Scott Pack, Andrew Schulman, mdpc
If this question can be reworded to fit the rules in the help center, please edit the question.

Do you get the same "Warning: No archive files were found for these roots" every time you run the sync? When this happened to me, it was because the archive files couldn't be created on one side, because of a permissions issue. – Royce Williams Dec 11 '11 at 6:51

Browse other questions tagged or ask your own question.