Hello, recently I created a post on how to fix the Time Machine AFP issue with OS X Lion. View it here - http://techpump.co.uk/?p=105 
Last edited:
I should of been more specific, when I meant home folder, I meant the home user folder.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.
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"
activate
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
do shell script "mv ~/" & hostName & "_" & macAddress & ".sparsebundle /Volumes/" & volumeName & "/" with administrator privileges
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.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:
PHP: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" activate 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:
PHP: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.
Hello, recently I created a post on how to fix the Time Machine AFP issue with OS X Lion. View it here - http://techpump.co.cc/?p=105![]()