I’ve been having a lot of fun with Leopard Server recently.
Even though the Server edition seems in many ways like a couple of tools were slapped onto OS X as an afterthought, it does have a lot of extras that I find useful in managing disparate Mac systems. For example Leopard’s new Time Machine, while not a full-featured backup solution, provides a largely self-managed solution that involves relatively little administrator overhead. The users can connect to the “backup” server (we’ll leave that in euphemism quotes for now), navigate through and restore their own items, and all I have to do is make sure the terabytes of space don’t run dry.
Well, hm, about that….
Say there are ten users running Time Machine, and a one terabyte drive being used for backups. Minus filesystem overhead, that’s conservatively 90 gigabytes per user — definitely less than the typical drive capacity on a new Mac. Now, it’s true that most users won’t use the full capacity of their drives. Still, I’d rather do what I can to reduce needless waste of our precious space.
On an unmanaged computer, Time Machine will give the user a fairly simplistic way to exclude folders. Workgroup Manager on OS X Server, however, will only give the administrator a paucity of options in its basic state: the path, whether to skip system files (good!), whether to back up automatically, and an optional quota. Nowhere is there an option for finer control over what gets backed up; it’s either “everything on the drive” or “everything on the drive minus system files.” “System files” is an odd designation, too, because it still backs up the Applications, Library, and some System folders.
Fortunately, there is a more advanced mode in the Workgroup Manager. It’s going to require a bit of work, though. Here’s what I did:
First, I created a directory in
/Library called “
Client Preferences” on the speculation that I’ll be doing more of this sort of thing. Managed clients have a similar directory called “
Managed Preferences” so I thought this would be a nice match.
With that directory created, I copied the
/Library/Preferences/com.apple.TimeMachine.plist file into the
Client Preferences directory. (That’s not to be confused with
/Library/Preferences/com.apple.MCX.TimeMachine.plist which is, in fact, completely different.)
Now for the hack-and-slash. Just about everything except for the excluded directories entry can be managed through Workgroup Manager, so delete those keys and leave only the excluded directories. From there it’s a matter of simply putting in what you wish to exclude, each one in a separate string. For example, if I wanted to only let the User directory be backed up on a default Leopard install, I’d have:
<dict> <key>ExcludeByPath</key> <array> <string>/System</string> <string>/Applications</string> <string>/Library</string> <string>/Desktop</string> </array> </dict>
Finally, go into the Workgroup Manager’s preferences for the computer or computer group you want to set the exclusions for (note that you can’t set Time Machine preferences of any sort for users or user groups). Click over to “Details” instead of “Overview” and you’ll see a list of what you’ve already set. Add a set of preferences by clicking on the “+” button at the bottom, navigate to the new Time Machine .plist file in the
Client Preferences directory, and click “Add”. You should now have a more granular Time Machine backup strategy!
Note that if you wanted to set different directories for different computer groups, you still only need the one file; you can add it and then edit the keys directly in the Workgroup Manager without altering the file itself — WGM only gets its initial preferences from the file.
I’ve used this strategy to shave tens of gigabytes off of each client’s backup. Three cheers for efficiency!