Skip to content

Instantly share code, notes, and snippets.

@aphexddb
Last active January 2, 2016 12:18
Show Gist options
  • Save aphexddb/8302179 to your computer and use it in GitHub Desktop.
Save aphexddb/8302179 to your computer and use it in GitHub Desktop.

Time Machine on any network share

Time Machine setup for OSX Mavricks on a shared file server (Linux, windows, etc.)

  1. Find out the machine name of your Mac

     $ hostname
    

    It should be something like: yourname-mbp

  2. Get the abbreviated MAC address of your Mac

     $ ifconfig en0 | grep ether | awk '{print $2}' | sed 's/://g'
    

    Your result should be something like: 16ddb1d61f1a

  3. Connect your Mac to the network share that you want to backup to. Examples:

    • smb://10.0.0.10/myshare
    • nfs://192.168.1.10/myshare2
  4. Create a disk image on your Mac that will be your TimeMachine backup

     $ hdiutil create -size 500g -type SPARSEBUNDLE -nospotlight -volname "Backup of yourname-mbp" -fs "Case-sensitive Journaled HFS+" -verbose ~/Desktop/yourname-mbp_16ddb1d61f1a.sparsebundle
    
    • Make sure the machine name matches what you found out from #1
    • Make sure the MAC address matches what you found out from #2
    • You can customize the size by changing the 500g
  5. Copy the .sparsebundle disk image from your desktop to your network share mounted in step #3. Get some coffee while it transfers over.

  6. Double click the .sparsebundle file on your network share to mount it. You should now see a mounted disk called Backup of yourname-mbp

  7. Tell your Mac that time machine should use your new disk image

     $ sudo tmutil setdestination "/Volumes/Backup of yourname-mbp/"
    
  8. Enable Time Machine!

    • Goto System Prefrences -> Time Machine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment