Time Machine Backup to Samba NAS with Mac OS X 10.5.8

After a couple of days of struggling and Googling, I finally came across a resource that worked to allow Time Machine to back up to my NAS over Samba with Mac OS X 10.5.8. The resource I found is How to setup your QNAP NAS with Apple Time Machine. However, it’s not put together very well. So I decided to make my own write-up in my own words and screenshots, borrowing knowledge from other links and the rsync command from the QNAP wiki. I really wanted to have a good backup before the transition to Snow Leopard (Mac OS X 10.6).

  1. Find your computer’s name. This is found in System Preferences -> Sharing in the Computer Name field.
    Picture 1
  2. Find your ethernet adapter’s MAC address (not wireless, but the physical ethernet). This is found in System Preferences -> Network -> Ethernet -> Advanced -> Ethernet and it is the Ethernet ID.
    Picture 2
  3. Find your hard drive size. Right-click on your hard drive on your desktop and select Get Info. Then look for the capacity line. This may report something a little funny like 297.77 GB. In my case, I have a 320GB hard drive. You may need to look up the specs on your laptop to get this number.
    Picture 3
  4. Come up with a good short name for your computer. Since my computer’s name is “Garrett Bartley’s MacBook Pro”, I came up with “GBMBP”. Try to keep this as short as possible (5 characters max).
  5. Open the Terminal from Applications -> Utilities -> Terminal.
  6. In the Terminal window, type
    hdiutil create -size {Hard drive size from step 3}g -fs HFS+J -volname "TM_{Name made up from step 4}" "{Computer name from step 1}_{MAC address minus the colons (:) from step 2}.sparsebundle"

    replacing everything in the curly braces (including the braces themselves) with the proper values. Do not close Terminal just yet.

  7. Once that has completed, open Finder and browse for the network share you wish to back up to. Double-click it to open it and enter any authentication to get it to mount.
  8. Now type
    ls /Volumes

    in Terminal to get the name of the place where the network share is mounted. It should be same name as the share name, but it never hurts to double-check

  9. Type
    rsync -avE "{Computer name from step 1}_{MAC address minus the colons (:) from step 2}.sparsebundle" /Volumes/{Share Name from step 7}/

    in Terminal, once again replacing the curly braces with the proper values.

  10. Once the rsync copy has finished, it is safe to delete the file. Type
    rm -rf "{Computer name from step 1}_{MAC address minus the colons (:) from step 2}.sparsebundle"
  11. Now type
    defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

    to enable Time Machine to see your share. After this, it is safe to close Terminal. You may have to log out and log back in or restart your computer for this to take affect. If you don’t see your network share in Time Machine in the steps below, log in/out or restart and try the next steps again.

  12. Now open Time Machine by going to System Preferences -> Time Machine.
    Picture 4
  13. Click Choose Backup Disk and select your network share. Then click Use for Backup. Enter your username and password to the share if prompted.
    Picture 5
  14. Now wait for the 120-second countdown to finish. It may take a while to prepare, but it will get there eventually.
    Picture 6

To help speed things up, you may want to tell Spotlight to not index the backup. You can only do this once the backup has made it past the preparing stage and started copying data. Otherwise, you will get an error.

  1. Open System Preferences -> Spotlight.
  2. Go to Privacy.
  3. Click the + and add the “TM_{Name made up from step 4}” under the Devices section.

Another thing to consider is if you have any backup solutions such as DropBox or Mozy, you can exclude those from the Time Machine backup as well. Do this by clicking Options in Time Machine and click the + to add those directories.

This process worked great for me on my Mac Mini and my MacBook Pro. Both are running Mac OS X 10.5.8 with all software updates to-date (as of the time of posting). Depending on the amount of data on your hard drive, it could take a while. If you can, plug your Mac into your ethernet network to help speed things up.

This entry was posted in Geek Stuff and tagged , , , , , , , , , , , , , , , , , . Bookmark the permalink.

2 Responses to Time Machine Backup to Samba NAS with Mac OS X 10.5.8

  1. GB, I’m curious to see if you’ve been able to replicate these results on Snow Leopard.

  2. JoeJ says:

    Great instructions, worked great on my Buffalo Linkstation NAS.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>