Time Machine backups to Windows shared network drive

As some of you may have already read I acquired a MacBook Pro about half a year ago and I love it ;) . Now one of the really cool things OS X provides is Time Machine backups.

It's so great because you simple don't have to do anything. If at all, you can specify the folders which should be excluded from the backup, but the rest is a completely automated process. Time Machine takes care of creating backups that contain the best possible coverage, starting from hourly, weekly to monthly backups, depending on the remaining space on your backup drive.

Now, Apple wouldn't be Apple if they wouldn't have a business model behind this thing.They call it Time Capsule and it is the device which is intented to be the backup drive on the other side of Time Machine. It is more than just a simple external (network capable) HD: it may also function as print server and router.

Anyway, I already bought an external HD about 1 1/2 years ago (I guess). Unfortunately it cannot be attached to the network, but just over USB. So for a while I used to do my backups by manually attaching my HD to the USB port of my MacBook and let Time Machine do its work. However this is cumbersome and you often forget to attach it regularly and moreover, the HD usually stands at some place in your apartment. You're not going to take it around and again, it's nerving to take your notebook there, attach it just for the purpose of doing backups.

So the idea came to my mind of sharing my HD over the network through another computer. I still have my very first notebook, an Acer which is about 6 years old now, I guess. I usually use it as some kind of server, also for sharing my non-network printer to the home wireless. So why shouldn't I also expose my HD?
A post on Superuser pointed me to some interesting pages (this one is another good one). I'm not going to repeat everything since you can get more informations on the linked pages. The main steps are the following:
  1. Activate 'unsupported' network drives for backup
    defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

  2. Create a sparsebundle which will be used by TimeMachine for doing its job. This sparsebundle has to be created locally
    sudo hdiutil create -size 320g -type SPARSEBUNDLE -nospotlight -volname "Backup of <computer_name>" -fs "Case-sensitive Journaled HFS+" -verbose ~/Desktop/<computer_name>_<mac address>.sparsebundle

  3. Share the external HD on your Windows server (or notebook as in my case) and make sure you have the necessary user rights for writing/reading.

  4. Mount the network drive and copy the created sparsebundle on it

  5. Configure the network drive for backups by referencing it from within the Time Machine configuration
You have to pay attention that the hostname you indicate in the .sparsebundle name matches exactly your Mac's hostname. Spaces and strange characters may create problems.
Moreover I'd suggest to do the first backup directly over a wired network connection since the 1st backup may take quite a while.

Note, if you use your ethernet card for doing the initial backup which is highly recommended, you have to use the MAC address of your that ethernet card, otherwise Time Machine won't recognize your sparsebundle.

I'm now using this backup mechanism for about three weeks and it works seamlessly. When my Mac is within the home wireless network it automatically connects to the shared backup drive and starts creating his hourly backups. Just great :)



Your ad here?