Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to sync the following locations using unison:

  • /home/user/Audiobooks with /shared/Audiobooks
  • /home/user/Music with /shared/Music
  • /home/user/Podcasts with /shared/Podcasts

What would the unison command line parameters be? Based on this, I can guess

If one or more path preferences are given, then Unison will synchronize only these paths and their children. (This is useful for doing a fast sync of just one directory, for example.) Note that path preferences are intepreted literally—they are not regular expressions.

Here's my guess. Is that correct?

unison -ui text /home/user /nocrypt/Shared -path Audiobooks -path Music -path Podcasts 

I could also use a profile. I read the help docs and found the an example that I adapted. I'm not sure it is correct, however.

Modified from the help docs: Here is a more sophisticated profile, illustrating some other useful features.

# Roots of the synchronization
root = /home/user
root = /shared

# Paths to synchronize 
path = Audiobooks
path = Music
path = Podcasts

Is that correct?

By the time I finished writing this question, I pretty much have it figured out. I think both methods above are correct. The great thing about unison is that you can do a "dry run" the same way you would do an actual sync. The default action is always "no action" (after all changes are presented). I'm going to test it now and see if it works. I guess I don't need an answer, but I'll leave this question here for reference (and answer it myself with a confirmation of whether or not this worked).

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Yes, I am confirming what I stated in the question is correct.

share|improve this answer
    
hahahahaha this question is hilarious. Does this work as parameters to the GUI profiles, since they're basically just command line sets? –  Trevor Alexander Feb 3 at 6:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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