1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Fix Time Machine AFP Issues!

Discussion in 'Mac OS X Lion (10.7)' started by CallumCc, Aug 3, 2011.

  1. CallumCc, Aug 3, 2011
    Last edited: Aug 27, 2011

    macrumors newbie

  2. macrumors 6502

    Well, I tried it out and figured it was worth a shot. Whatever hack this uses seems to rely on an external library file that you inject into the file system and point to using a modified .plist file. So long as you restore the backup plist, all changes should be reverted safely.

    The tool used for creating sparsebundles didn't work for me for some reason. No file was generated in my home directory (~). There are other tools out there that I tried, and they seemed to work fine. I used this: http://code.google.com/p/backmyfruitup/

    I've started a backup, and so far I'm noticing that data rates to the disk are insanely low right now. I don't know if this is due to the hack, or due to the fact that I've attached a really crappy old NAS unit to my network for testing purposes, not wanting to screw with the one I usually use.
  3. macrumors newbie

    I should of been more specific, when I meant home folder, I meant the home user folder. :)
  4. Takuro, Aug 3, 2011
    Last edited: Aug 3, 2011

    macrumors 6502

    I've decided to dissect some of the scripts to see what they do and why there isn't anything in the home directory, as there is supposed to be according to the instructions.

    Here's the preparefortimemachine applescript:
    on open names
        set volumeName to names 
    as text
        set macAddress to 
    (do shell script "ifconfig en0 | grep ether | tr -d '\\011' | sed s/ether// | sed 's/ //g' | sed s/://g")
    set hostName to (do shell script "hostname -fs")
    tell application "Finder"
    set theSize to round (((capacity of startup disk) / 1024 1024) / 1024)
    end tell
    do shell script "defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1" with administrator privileges
    do shell script "sudo hdiutil create -size " theSize " -type SPARSEBUNDLE -nospotlight -volname \"Backup of " hostName "\" -fs \"Journaled HFS+\" ~/" hostName "_" macAddress ".sparsebundle" with administrator privileges
    do shell script "mv ~/" hostName "_" macAddress ".sparsebundle /Volumes/" volumeName "/" with administrator privileges
        tell application 
    "Finder" to eject volumeName
        tell application 
    "System Preferences"
        end tell
        tell application 
    "System Events"
    tell application process "System Preferences"
    set frontmost to true
                click menu item 
    "Time Machine" of menu "View" of menu bar 1
            end tell
        end tell
    end open
    The following line in particular is interesting:
    do shell script "mv ~/" hostName "_" macAddress ".sparsebundle /Volumes/" volumeName "/" with administrator privileges
    Looks like the script actually moves the sparsebundle file out of the home directory and into the volume that you're creating it for. So you need to revise your instructions a bit. There's nothing left in the home directory when the process completes.
  5. macrumors newbie

    When I created the instructions, it was at the same time of performing this myself, the .sparsebundle went to my username in the 'Go' tab at the top of finder. Other users of this have also found this there.
  6. macrumors member

    This seems to be a SMB fix, not an AFP fix.

Share This Page