Forcing Portable Homes to Sync ~/Library
Forcing Portable Homes to Sync ~/Library
http://www.afp548.com/article.php?story=20050601101436323
With a little hacking this can be done. Don't forget in Workgroup Manager in MCX you can choose to exclude folders from the sync - like Safari's cache or the ~/Library/Caches folder.
Wednesday, June 01 2005 @ 12:30 PM CDT
Contributed by: macshome
Views: 2292
So. You've got your new 10.4 server setup and you are planning on using synced Portable Homes to backup your user's files. That's great as long as you don't care about ~/Library, which Apple has hard excluded from home syncing.
Like most things in life though, when there is a will there is a way.
Read on for the details...
Not only has Apple made it hard to sync ~/Library, they have added some nice touches to drive the point home. For example, if you try to add ~/Library to the sync list in WGM it will just vanish before your eyes. One time when I tried it, I could of sworn I heard my server laughing quietly at me...
Why bother syncing the user's Library? For most people it can be summed up in one word, Mail. Apple's Mail application uses ~/Library to store it's mail, and what is more valuable to backup than your e-mail? Not much on my Mac.
You would think it would be enough to remove ~/Library from the exclude rules on your server, but it's not. There are two more plists waiting to potentially foil you.
The user's own ~/Library/Preferences/com.apple.homeSync.plist file will trip you up. You can either edit the file, removing all keys that contain ~/Library, or just tell your mcx settings to override the user's sync settings. If you are managing all of this from a server I would just un-check the "Merge with user's settings" box and override them.
There is another plist waiting to get you, /System/Library/CoreServices/mcxd/Contents/Resources/CinchDefaults.plist and this one is the key. This file sets the defaults for the whole system. Make a backup, then remove all of the ~/Library keys from this plist. Now login as a user with a Portable Home and you should see ~/Library sync.
Now there are a lot of good reasons not to sync the contents of ~/Library, but if you are careful you can work your way around the pitfalls. I would add the ~/Library/Caches, ~/Library/Preferences/ByHost, and ~/Library/Preferences/Mirrors directories as a minimum to your exclude rules.
I normally tell you here to have fun and read the man pages, but since there are no man pages in this case you can just concentrate on having fun.