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).