AppleScript verwandelt jedes NAS in Time Machine Laufwerk

by frank

Eine einfache Anwendung auf Grundlage eines Apple Scripts soll jedes NAS in ein Time Machine Laufwerk verwandeln können.

Simply download this app package and drag your drive onto it. The script adds the drive as a Time Machine capable device and then you can simply add it under Time Machine System Preferences.

The full script is right here if you want to roll your own:

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

via MacOSXHints

… jetzt fehlt mir bloß noch das NAS ;-)

Post to Twitter Post to Plurk Post to Delicious Post to Facebook Post to Ping.fm

Verwandte Artikel