Contribute  :  Advanced Search  :  Directory  :  Forum  :  FAQ's  :  My Downloads  :  Links  :  Polls  
AFP548 Changing the world one server at a time.
Welcome to AFP548
Thursday, July 29 2010 @ 09:32 am MDT
   

Forcing Portable Homes to Sync ~/Library

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

    (Extra thanks to Mr. Bartosh for his help on this.)

    Story Options

    Advertising

    Forcing Portable Homes to Sync ~/Library | 32 comments | Create New Account
    The following comments are owned by whomever posted them. This site is not responsible for what they say.
    Forcing Portable Homes to Sync ~/Library
    Authored by: Anonymous on Wednesday, June 01 2005 @ 07:31 pm MDT
    Thank you, thank you, thank you. And thank you too, MB.

    I recently did a setup where I made this work by renaming the users' Library
    folders as .lib and then softlinking Library -> .lib and that seemed to work fine, but
    this is easier and cleaner.


    Rusty
    Forcing Portable Homes to Sync ~/Library
    Authored by: bcirvin on Thursday, June 02 2005 @ 11:59 am MDT
    Thanks for doing the hard work for me! I'm going to try this in an all AD/Linux
    backend environment - I'll try to post either success or failure.

    ---
    systems engineer, tribune review publishing company, pittsburgh, pa

    "What guy would call his company 'micro' and 'soft'?"
    Forcing Portable Homes to Sync ~/Library
    Authored by: Anonymous on Sunday, June 05 2005 @ 11:43 pm MDT
    the question remains: why did Apple make this so hard in the first place? Is
    there a technical reason, or some other?
    Forcing Portable Homes to Sync ~/Library
    Authored by: Anonymous on Monday, June 06 2005 @ 12:34 am MDT
    A warning to others, I had to reinstall tiger server, and when I went to resync
    my mobile account on my laptop it wiped out my whole home folder and
    copied the standard empty home folder that was on the server to my laptop.
    Sometimes when I would sync it would ask me if the local copy or the server
    was more up to date, but this time is just wiped everything out.

    Is there a "proper" procedure for reinstalling the server and keeping your
    mobile account from getting wiped out the first time you sync again? I guess
    if I ever have to do it again, I'd make sure the home folder on the server for
    the mobile user is completely empty. Maybe this would force it to recognize
    that the folder on the other machine is more up to date.
    Forcing Portable Homes
    Authored by: earthsaver on Sunday, July 31 2005 @ 11:30 am MDT
    Now that you've gotten this far, have you also figured out how to force
    the Mobility options in Accounts preferences to be available on non-
    server Mac OS X?

    ---
    - Ben
    Q16 1.25 - Tiger
    Forcing Portable Homes to Sync ~/Library
    Authored by: The Limey on Tuesday, August 23 2005 @ 10:59 am MDT
    Has anybody worked out how to avoid getting problems with .fstemp. files?
    None of the ignore settings in WGM seem to help.
    Symlinking vs. Plist Editing
    Authored by: Justin Burns on Tuesday, September 06 2005 @ 06:03 pm MDT
    I've had a chance to try out both methods of syncing ~/Library and I have
    to say that the symlink method is very problematic, whereas the plist route
    is working swimmingly.

    The main problem with the symlinking is that when the user creates their
    new mobile home on a client machine, a real Library folder is created
    regardless of whether or not the the directory is symlinked on the server.
    This means any time a mobile user logs into another machine, Library
    sync'ing will not happen until an admin logs in, moved ~/Library to ~/.lib
    and creates the symlink. Not good.

    The instructions in the article are spot-on, and I would strongly discourage
    anyone from trying to save time by symlinking Library instead of removing
    the exclusions for it.

    -justinb