5

Will the following work? If not, can someone propose better alternaives to solve this problem?

Summary problem: I want to sync multiple MacBook Air's, Pro's and possibly Mini's with the same user-account info, for only one account--call it myuser. All systems will have the same MacOS major rev. eg: they're all 10.7 or 10.8 or higher. I do NOT want to employ OS X Server for the synchronizing.

Summary, proposed solution: git-sync the Preferences and /User/myuser directory, rsync the Application directories, and use known-working mechanisms (Dropbox, IMAP) to sync everything else.

Details.

Migration Assistant is unreliable for complete copy/sync per this and this and my personal experience. ChronoSync, per this discussion looks interesting, but I don't know exactly what it's doing for Preferences... and I want to exactly what's going on. I've also restored TimeMachine backups and found they do not replicate the environment I backed up (huge disappointment). I'm an experienced system admin on non-MacOS sytems, so consider me a control freak.

I've used git to sync Terminal.app/shell settings in /User/myuser and Thunderbird profile(s) across multiple Macs (git branching for diff Thunderbird profiles on different Macs if/as need be provides useful flexibility). Despite the lack of depth of git's file-metada management, this has worked well. I'd like to git-sync (to a "central-repository" server/service like Bitbucket) the following directories across my Macs, employing branches as needed/wanted for unique customizations:

  • /Library/Preferences
  • /Library/PreferencePanes
  • ~/Library/Preferences
  • ~/Library/PreferencePanes

(Everything else in ~/Library and /Library appears to be uninmportant or automatically regenerated.)

Then I plan to rsync the following together (git is less useful here due to ease of recreating installed applications plus less practical due to size of /Applications):

  • /Applications
  • ~/Applications

I realize I may need to close all pertinent applications+processes in order to properly sync the Preferences and Applications spaces and avoid running-process locks and related problems.

I'm not as familiar with any Preference-management-magic that might be in auto-deployment systems like Absolute Manage, Casper, Munki, Sikuli, Salt and similar tools. Would love to know if there's Preference-management capability/knowledge/know-how in these tools, and if so, how to reuse said knowledge. Each of the said tools seem to address a broader scope of requirements and present a higher barrier to entry/employment. I'd rather just start with my very easy to setup git-based method on ~/Library/Preferences (and the like) going.

All of the other directories on these systems--particularly in /User/myuser--are being synchronized via other means, like Dropbox, IMAP email, and similar, already-proven methods like rsync. I'm less certain rsync will work for copying /Applications, hence the specific call-out above.

5
  • One thing you'll find difficult is the ~/Library/Preferences/ByHost/ files, because they are all named as com.apple.blah.UUID.plist, where UUID is the hardware UUID of each machine. You can get the UUID for a machine via system_profiler SPHardwareDataType | grep UUID
    – Kent
    Commented Sep 13, 2013 at 8:09
  • @Kent - understood. I'm expecting the git repo/master would contain files for all the Macs/machines all saved in ~/Library/Preferences/ByHost/. And since each ByHost file has a unique name, and presuming (?) that a MacOS machine with UUID = X would ignore files with UUID = Y, I don't see a problem with this. Do you? Commented Sep 13, 2013 at 13:33
  • Yeah .. the other files are ignored. But, if you wanted those preferences to be synced between your machines, you'd have to become creative and copy the "X" file to "Y" before syncing it so that machine Y would have the updated prefs when it read from its file. If you have different types of hardware, that might have some unexpected consequences.
    – Kent
    Commented Sep 13, 2013 at 23:26
  • @Kent - right, good point. A quick look at ByHost filenames suggest that the responsible apps/etc are less impactful for my workspace/environment than the non-ByHost preferences. (Or at least, that's my current, wishful thinking.) As such, I'd plan to have to manually manage/copy the ByHost-based preferences, and maybe make a script(s) to copy the more-impactful ones. Commented Sep 14, 2013 at 13:16
  • Johnny I'm attempting to do something similar using BTSync.
    – cavalcade
    Commented Dec 7, 2013 at 8:52

1 Answer 1

2

Seems like ChronoSync could help in a limited way. The support pages have warnings on syncing ~/Library. See ChronoSync - Syncing your Home folder.

You could try Unison for everything instead of multiple tools and approaches (one caveat is that Unison was last updated in 2009; it's source is available under GPL though).

References:
Unison Frequently Asked Questions (FAQ)
Using Unison on Specific Operating Systems

1
  • Thanks, helpful. From Chrono's 'Syncing your Library folder' I see: "Preferences: [...] Depending on what you are synchronizing between Macs you may need to synchronize some Preferences files. First, you need to set up a separate Synchronizer document synchronizing the two Preferences folders located under the Library folder. [...] Click here to download a Synchronizer document that helps with this setup. All the rules are already complete so you only need to set the Targets." Commented Sep 13, 2013 at 18:07

You must log in to answer this question.

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