{"id":39584,"date":"2009-11-10T15:30:05","date_gmt":"2009-11-10T20:30:05","guid":{"rendered":"http:\/\/www.crunchgear.com\/?p=123359"},"modified":"2009-11-10T15:30:05","modified_gmt":"2009-11-10T20:30:05","slug":"an-applescript-trick-turns-any-nas-device-into-a-time-machine-drive","status":"publish","type":"post","link":"https:\/\/mereja.media\/index\/39584","title":{"rendered":"An AppleScript trick turns any NAS device into a Time Machine drive"},"content":{"rendered":"<p><a href=\"http:\/\/www.crunchgear.com\/wp-content\/uploads\/2009\/11\/genius.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.crunchgear.com\/wp-content\/uploads\/2009\/11\/genius.png\" alt=\"genius\" title=\"genius\" width=\"216\" height=\"216\" class=\"alignright size-full wp-image-123362\" \/><\/a><br \/>\nYou can turn any network attached storage device into a Time Machine back-up drive with one simple step.<\/p>\n<p>Simply <A HREF=\"http:\/\/aladino.dmi.unict.it\/?a=prepareForTimeMachine\">download this app package<\/A> 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.<\/p>\n<p>The full script is right here if you want to roll your own:<\/p>\n<p><code>on open names<br \/>\n  set volumeName to names as text<br \/>\n  set macAddress to (do shell script \"ifconfig en0 | grep ether | tr -d '\\\\011' | sed s\/ether\/\/ | sed 's\/ \/\/g' | sed s\/:\/\/g\")<br \/>\n  set hostName to (do shell script \"hostname -fs\")<br \/>\n  tell application \"Finder\"<br \/>\n    set theSize to round (((capacity of startup disk) \/ 1024 \/ 1024) \/ 1024)<br \/>\n  end tell<\/p>\n<p>  do shell script \"defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1\" with administrator privileges<\/p>\n<p>  do shell script \"sudo hdiutil create -size \" &#038; theSize &#038; \" -type SPARSEBUNDLE -nospotlight -volname \\\"Backup of \" &#038; hostName &#038; \"\\\" -fs \\\"Journaled HFS+\\\" ~\/\" &#038; hostName &#038; \"_\" &#038; macAddress &#038; \".sparsebundle\" with administrator privileges<br \/>\n  do shell script \"mv ~\/\" &#038; hostName &#038; \"_\" &#038; macAddress &#038; \".sparsebundle \/Volumes\/\" &#038; volumeName &#038; \"\/\" with administrator privileges<\/p>\n<p>  tell application \"Finder\" to eject volumeName<\/p>\n<p>  tell application \"System Preferences\"<br \/>\n    activate<br \/>\n  end tell<\/p>\n<p>  tell application \"System Events\"<br \/>\n    tell application process \"System Preferences\"<br \/>\n      set frontmost to true<br \/>\n      click menu item \"Time Machine\" of menu \"View\" of menu bar 1<br \/>\n    end tell<br \/>\n  end tell<\/p>\n<p>end open<\/code><\/p>\n<p><A HREF=\"http:\/\/www.macosxhints.com\/article.php?story=2009103103534090\">via MacOSXHints<\/A><\/p>\n<p><a href=\"http:\/\/feedads.g.doubleclick.net\/~at\/ypb-L-16jvPt2uLpf62vdgnTsLE\/0\/da\"><img decoding=\"async\" src=\"http:\/\/feedads.g.doubleclick.net\/~at\/ypb-L-16jvPt2uLpf62vdgnTsLE\/0\/di\" border=\"0\" ismap=\"true\"><\/img><\/a><br \/>\n<a href=\"http:\/\/feedads.g.doubleclick.net\/~at\/ypb-L-16jvPt2uLpf62vdgnTsLE\/1\/da\"><img decoding=\"async\" src=\"http:\/\/feedads.g.doubleclick.net\/~at\/ypb-L-16jvPt2uLpf62vdgnTsLE\/1\/di\" border=\"0\" ismap=\"true\"><\/img><\/a><\/p>\n<div class=\"feedflare\">\n<a href=\"http:\/\/feeds.feedburner.com\/~ff\/crunchgear?a=LOCNnulf9Lc:HMxQrGKh5_g:V_sGLiPBpWU\"><img decoding=\"async\" src=\"http:\/\/feeds.feedburner.com\/~ff\/crunchgear?i=LOCNnulf9Lc:HMxQrGKh5_g:V_sGLiPBpWU\" border=\"0\"><\/img><\/a> <a href=\"http:\/\/feeds.feedburner.com\/~ff\/crunchgear?a=LOCNnulf9Lc:HMxQrGKh5_g:F7zBnMyn0Lo\"><img decoding=\"async\" src=\"http:\/\/feeds.feedburner.com\/~ff\/crunchgear?i=LOCNnulf9Lc:HMxQrGKh5_g:F7zBnMyn0Lo\" border=\"0\"><\/img><\/a> <a href=\"http:\/\/feeds.feedburner.com\/~ff\/crunchgear?a=LOCNnulf9Lc:HMxQrGKh5_g:yIl2AUoC8zA\"><img decoding=\"async\" src=\"http:\/\/feeds.feedburner.com\/~ff\/crunchgear?d=yIl2AUoC8zA\" border=\"0\"><\/img><\/a>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>You can turn any network attached storage device into a Time Machine back-up drive with one simple step. 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-39584","post","type-post","status-publish","format-standard","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/posts\/39584","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/comments?post=39584"}],"version-history":[{"count":0,"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/posts\/39584\/revisions"}],"wp:attachment":[{"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/media?parent=39584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/categories?post=39584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mereja.media\/index\/wp-json\/wp\/v2\/tags?post=39584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}