Skip to content

Instantly share code, notes, and snippets.

@gauteh
Created October 27, 2013 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gauteh/7179635 to your computer and use it in GitHub Desktop.
Save gauteh/7179635 to your computer and use it in GitHub Desktop.
# /bin/bash
#
# Makes a sparsebundle and set it up
hostname=$(hostname)
# create sparsebundle
hdiutil create -size 300g -library SPUD -fs HFS+J -type SPARSEBUNDLE -volname "Backup-${hostname}" "${hostname}.sparsebundle"
# enable unsupported volumes
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
echo "copy ${hostname}.sparsebundle to the networkdrive,
open it and set it as the destination in time machine. Or use:
$ sudo tmutil setdestination -p /Volumes/Backup
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment