Last active
May 5, 2017 21:28
-
-
Save pawcik/6f2be2ac880757fcd992e0ce64508dbb to your computer and use it in GitHub Desktop.
Create sparsebundle timemachine image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # thanks to http://www.makeuseof.com/tag/turn-nas-windows-share-time-machine-backup/ | |
| #create sparce image size (prefer twice of mac local drive) | |
| hdiutil create -size 1024g -type SPARSEBUNDLE -fs "HFS+J" TimeMachine.sparsebundle | |
| #mount sparse bundle image | |
| # how to make it persistent ? | |
| hdiutil attach -mountpoint /Volumes/TimeMachine /Volumes/Data/TimeMachine.sparsebundle | |
| # tell timemachine to use this image for backup | |
| sudo tmutil setdestination /Volumes/TimeMachine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #@credentials https://dillieodigital.wordpress.com/2013/08/02/quick-tip-how-to-mount-a-timemachine-network-drive-at-login/ | |
| try | |
| do shell script "mkdir -p /Volumes/Data" with administrator privileges | |
| do shell script "mount -t afp 'afp://user:password@TIMEMACHINE_IP/Data' /Volumes/Data" with administrator privileges | |
| do shell script "hdiutil attach -mountpoint /Volumes/TimeMachine /Volumes/Data/TimeMachine.sparsebundle" with administrator privileges | |
| end try" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment