1

I would like to use the GUI version of Unison to sync two folders and preserve the timestamps of files as it does so.

Context:

I can see that the command line version of Unison defaults to changing the timestamp of any file that is synced to that of the sync time. I can also see that by adding the -times option I can get it to preserve the modified time of whichever file it has given priority to in the update. So far so good.

The question:

In the GUI version how do I add or change the "-times" option?

  • There is the profile creation section, which when one goes back and edits an existing profile has a free text edit field, but as this appears to contain one field per root there doesn't seem to be a place to apply options. Furthermore, sometimes the "edit" button is greyed out
  • In the main interface for running a profile there are several menus but nothing that looks like it might relate to times, or a general free text box for options.

I have looked at the Unison manual but can only find the most cursory mentions of "-times" let alone how to use it in the GUI.

4
  • Sorry, but Linux Mint is off topic on AskUbuntu. You can however ask on our sister site, unix.stackexchange.com Mar 24, 2017 at 11:49
  • Thank you, but this is a question about unison, its the same unison with the same manual.
    – Puffin
    Mar 24, 2017 at 11:52
  • 1
    Okay, then I suggest that you remove the reference to Mint :) Mar 24, 2017 at 11:53
  • Just for completeness, I have checked unix.stackexchange for pre-existing answers but not found anything there either. It seems it could fit on either site.
    – Puffin
    Mar 25, 2017 at 15:53

1 Answer 1

3

I have not seen how to do this in the GUI itself. However, the GUI reads a profile file with settings for a specific comparison. On ubuntu (and MacOS for that matter), profile XXX is stored as ~/.unison/XXX.prf. Such profiles can be reused, e.g., to keep two paths synchronised, by selecting them consistently from the GUI. Typical profile content would include

root = /home/USER/some/path
root = /media/USER/external_hdd/some/path

where /home/USER/some/path and /media/USER/external_hdd/some/path are two paths that are to be kept in sync.

Regarding this question, I have a similar requirement but found a solution that works for me. Adding

times = true

in that file ensures that timestamps for files are maintained between the two roots when files are copied from one root to the other.

Many other command line options can be specified in this way, so the Unison GUI stays relatively simple but still has (most of?) the power of command line Unison.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .