Trying to set up Unison version 2.40.65 on two Ubuntu 12.04 LTS desktop computers. The primary computer is a System76. The secondary computer is a late 2012 Apple mini mac that no longer has OS X on it. Both computers have ext4 file systems installed.

I decided to test Unison before using it for critical syncing since I had a previous experience with Windows to Windows syncing program that was barely usable (as in slow, unstable, and God help you if the network went down). I tested all those faults with Unison and it passed by a wide margin.

I have a significant problem with Unison ignore = Path. I set the ignore using the GUI and editing the profile file. When a folder or file gets added inside the last folder in the path, Unison wants to add the new stuff to the opposite computer from where it was added. So ignore does work according to the definition in the Unison documentation:

ignore xxx

Including the preference -ignore pathspec causes Unison to completely ignore paths that match pathspec (as well as their children). This is useful for avoiding synchronizing temporary files, object files, etc. The syntax of pathspec is described in the Path Specification section, and further details on ignoring paths is found in the Ignoring Paths section.

What I seeing in my test counter to “(as well as their children)”. I was hoping ignore = Path meant no matter what always ignore every change in that path.

Here is a copy of my working test unison profile:

label = test2
root = /home/butest/Documents
root = ssh://butest@
sshargs = -C  
ignore = Path Documents/4_Significant_Events/*

Here is a list of the ignore = Path combination I've tried with no success. They either throw an exception or had the same behavior as above.

ignore = Path home/butest/Document/4_Significant_Events

ignore = Path /home/butest/Document/4_Significant_Events

ignore = Path //home/butest/Document/4_Significant_Events/

ignore = Path {home/butest/Document/4_Significant_Events}

ignore = Path {/home/butest/Document/4_Significant_Events}

ignore = Path {//home/butest/Document/4_Significant_Events/}

ignore = Path home/butest/Document/4_Significant_Events*

ignore = Path /home/butest/Document/4_Significant_Events*

ignore = Path //home/butest/Document/4_Significant_Events*/

ignore = Path {home/butest/Document/4_Significant_Events*}

ignore = Path {/home/butest/Document/4_Significant_Events*}

ignore = Path {//home/butest/Document/4_Significant_Events/*}

ignore = Path home/butest/Document/4_Significant_Events[*]

ignore = Path /home/butest/Document/4_Significant_Events[*]

ignore = Path //home/butest/Document/4_Significant_Events/[*]

ignore = Path {home/butest/Document/4_Significant_Events[*]}

ignore = Path {/home/butest/Document/4_Significant_Events[*]}

ignore = Path {//home/butest/Document/4_Significant_Events/[*]}

Also I was hoping to keep the time stamp the same on both computers. But I can't figure out how to force it. This minor compared to the other problem.

  • 1
    I really do not understand the question, could you please explain better? The Path in the ignore directive must be relative to the roots, so all the variants you put there are illegal. What problem has the first way (the one auto generated)? I have tens of ignores in my profiles and never had a problem. By the way, the path you are ignoring has two Documents in it? In the code, you ignore /home/butest/Documents/Documents/... – Rmano May 22 '14 at 3:58
up vote 1 down vote accepted

Let's see: ignore paths are relative. So all the additional examples you checked are illegal.

In this code:

label = test2
root = /home/butest/Documents
root = ssh://butest@
sshargs = -C  
ignore = Path Documents/4_Significant_Events/*

you are telling Unison to ignore all the paths under the roots that match the description, that is,


which I suspect is not what you want. If you want that your directory /home/butest/Documents/4_Significant_Events/ (and children) be ignored, simply change the last line with

ignore = Path {4_Significant_Events}

About the timestamp thing, I do not understand. Are you looking for times = true option to sync timestamps?

ignore = Path {4_Significant_Events}

Works Perfect. Are the {} similar to scope in C? So the above line could be stated as: unison ignore all the stuff in the scope of 4_Significant_Events.

times = true 

was what I needed, I was looking for it in the GUI as “time stamp” Works Perfect.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.