How To Backup Your Mac With A Homemade Time Capsule

tm featured   How To Backup Your Mac With A Homemade Time CapsuleAfter losing some fairly important accounting files recently, I realised that my backup strategy is quite flawed. Although I take a weekly bootable backup of my Mac, that doesn’t really help when I deleted the file I want a few weeks ago. To do that, I would need to make use of Apple’s built-in Time Machine functionality, but I don’t really want another drive attached on my beautiful zen desk space – and I’m certainly going to pay Apple £200-300 for a glorified router with built-in hard drive.

No, instead I’d like to just throw another 1TB into my home server and be done with it. Unfortunately, this isn’t entirely supported by Apple, so it’s going to need a little hacking together.

What You’ll Need

  • A spare hard disk, obviously. At least as large as your Mac primary hard disk.
  • A network file server of some sort that you can add the drive to.

I’ll be showing you specifically how to set this up for Windows Home Server or any regular Windows 7 machine that you use to share files on, but you should be able to do this using any form of networked file system. If you have no idea what Time Machine or a Time Capsule is, read this first.

On the Mac

This is the trickiest bit, so we’ll start with that. Open a new Terminal window (you can find this in your Applications -> Utilities folder) and follow the steps outlined below.

Copy and paste the following command into your Terminal window and hit enter. This is a quick little hack that tells your system “I want you to show me unsupported Time Machine volumes”.

>defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

Next, you need to note some information about both your machine name and your network ID. Your machine name is easy – just open System Preferences -> Sharing, and your Computer Name will be listed at the top. I suggest you change this to be something without spaces to avoid random errors later on, then note this down somewhere.

computer name   How To Backup Your Mac With A Homemade Time Capsule

Go back to the terminal Window and type:

ifconfig

You need to find the ETHER hardware address associated with the en0 network device (the network port on your mac). This is used as a unique identifier, and must be the address from en0 if you actually connect to the Internet using your wireless device. Find the section that details the en0 device, and write down or copy the 6 hexadecimal digit number that’s next to the word ether. Delete all the :’s to obtain your machines unique 16 alphanumeric code. You’ll need it for the next step.

ethernet id   How To Backup Your Mac With A Homemade Time Capsule

The following command will create what is called a SparseBundle. This is a single file that acts as a kind of disk image for your machine’s backups. When you use TimeMachine, it writes everything inside of this file. Remember to replace the appropriate parts of the command with your machine name, ethernet ID and hard disk size (don’t write the square bracket – look at my example below first).

sudo hdiutil create -size [Your hard disk size here]G -fs HFS+J -volname “[Your Machine Name here] Backup" [Your machine name here]_[Your 16 digit alphanumeric hardware ID here].sparsebundle

Here’s the example command that I used for my iMac which has a hard disk size of about 950GB and is creatively named “iMac”.

sudo hdiutil create -size 950G -fs HFS+J -volname "iMac Backup" iMac_d49a20d16b79.sparsebundle

A word of warning: Make sure your TYPE THE COMMAND on your own machine – if you try to copy and paste from this site, the character encoding will result in some kind of error, similar to the following:

error sparsebundle   How To Backup Your Mac With A Homemade Time Capsule

On Your Network Server

Installing the hard disk in your machine is a little out of the scope of this article, so I suggest you check out my previous article on how to add a second hard drive. As many drives come pre-formatted in FAT32 format, you’ll also want to reformat or partition your drive to NTFS. Next we’ll set up the network share itself.

Windows 7

To share a drive or folder in Windows 7, right click and select Share With -> Advanced Sharing.

windows right click advanced sharing   How To Backup Your Mac With A Homemade Time Capsule

Click Advanced Sharing again, and in the following dialog check Share this Folder, and give it a name you’ll remember (like TimeMachineBackup).

windows share path   How To Backup Your Mac With A Homemade Time Capsule

It’s also essential you set the permissions, as by default users can only READ from the share. Select the user or group you wish to give access to – EVERYONE is the easiest option here – and change the permission at the bottom of the dialog to FULL CONTROL.

Windows Home Server

I already run a Windows Home Server for downloading and streaming videos, so it makes sense to add the Time Machine backup drive there. After adding the physical drive to the machine, restarting your server and formatting the drive as NTFS, open up your Home Server Dashboard. On the Server Folders and Hard Drives tab, click the button on the right sidebar that says “Add a Folder”.

homeserver add folder   How To Backup Your Mac With A Homemade Time Capsule

Follow the Wizard to create your TimeMachineBackup folder. Make sure you choose to place the folder on your new drive, but if you forgot to do so then no worries as you can easily use the Move Folder function later. Set up permission as you wish, but skip the step about creating backups – you don’t really need a backup of your backup (technically, you probably should, but there’s a limit to how much backing up is humanely possible or worthwhile).

On Your Mac

Finally, head back to your Mac and find the SpareBundle file you created before. If you used the command I showed you, it should be located in the root of your user home directory.

Open up the network share you just created – I sometimes have trouble seeing my homeserver in the automatic network discovery, in which case you’ll need to press COMMAND-K and type in the address smb://HOMESERVER (or whatever your homeserver is called). You can also use the IP address of the machine if you know that instead.

Copy the SpareBundle file you created into your network Time Machine Backup shared folder, and open up the Time Machine system preferences screen.

time machine preferences   How To Backup Your Mac With A Homemade Time Capsule

Turn on Time Machine, and click Select Disk. If everything’s gone right, you should now see your backup listed there with the name you gave it when creating the SparseBundle. Select it, and proceed to backup to your new homemade Time Capsule!

choose time machine location   How To Backup Your Mac With A Homemade Time Capsule

I can’t tell you if having a Time Machine has saved my bacon yet, because it’s still backing up – but I’m pretty confident it’s going to be incredibly useful in the future when I least expect it.

Do you have a real Time Capsule, or managed to get your homemade one working? Share your experiences and problems in the comments, or head over to our tech support community site.

The comments were closed because the article is more than 180 days old.

If you have any questions related to what's mentioned in the article or need help with any computer issue, ask it on MakeUseOf Answers—We and our community will be more than happy to help.

16 Comments -

0 votes

Molped

Why not just use http://www.dropbox.com for smaller files and
http://www.crashplan.com for everything else?

0 votes

James Bruce

Hmm. I think you’re confusing iCloud and Time Capsule. Time Capsule is a physical device that you place on your own home network to handle regular intervaled backups and maintain a kind of file versioning, to be in conjunction with Time Machine interface. This is about how to create the same fucntionality for a fraction of the cost. 

CrashPlan and DropBox are cloud backup methods, and are in fact extremely slow. When I tried CrashPlan, it estimated a total of 6 months for an initial backup!

While I appreciate the cloud has uses in many instances, for me backup is not one of them…

0 votes

Molped

No I think we’re talking  about the same functionality.

Crashplan is slow because You are only looking at the “Cloud-part” of it.
The main feature of Crashplan is the ability to backup to other computers -
ie. other machines on Your home network – including versioning.
In my opinion it’s quite a risk You’re taking relying on “Time Capsule” as Your
only backup-plan.
My backup-plan:
http://www.dropbox.com for “documents”.
http://www.Crashplan.com for everything – backing up to 3 different machines on
my home network.
Everything of extra importance (Ie. pictures, video or even accounting files ;-) )
gets backed up to DVD’s (2 copies). That’s 3 layers of protection!
An besides that, I regularly take an image of my system partition.

I suggest You use Crashplan to backup to Your homeserver -
thats the easy solution… and You can control it remotely over the web!

Regards…

PS. If You need to remotely control Your server try
http://www.teamviewer.com

0 votes

James Bruce

I’d forgotten about that aspect of Crashplan app – it does indeed let you backup other computers to it, but I never bothered to trial those after the ridiculous slow upload speed to the cloud backup it was giving me. However, it’s still not the same functionality that Time Machine offers – that is, versioning. Crashplan simply gives you a one off backup of everything, it doesnt store many copies of the same file as they change over time – that’s the primary advantage of Time Machine. In addition, it’s not tied into any core OS components, so you can’t “restore” your entire machine from a Crashplan backup. You can with Time Machine. 

As for other backups, my home server runs “Windows home server” which has automated windows network backups and network restore functionality already built in – for windows only mind you, hence the need for a mac solution that ties into this. It’s already headless on local and internet too, no need for separate remote control apps. You certainly have an extensive backup strategy though, certainly to be applauded! Personally, there’s no way I’m going to try backing up 500gb or so of irreplaceable files to DVDs – that would need an entire spindle of 100 discs just for one backup set! Far easier to just get a 1tb drive, and place it off site don’t you think? Not such a big waste of DVDs either. 

0 votes

Charshee

Can’t tell if trolling or just very stupid…

0 votes

ermal

why don’t you just connect a usb drive using USB ?

0 votes

James Bruce

Because I dont like connecting USB drives to my machine. They’re ugly on my desk, and they sit in the finder screaming “hey, I’m another drive”. That’s not really the point though is it. Maybe if you have more than one mac, it’s nice to store everything in one place. 

0 votes

Stefan Oetter

What Mac do you have? With a Twelvesouth Backpack you can stack up to three drives on the back of an iMac so you don’t have to see them….also, turn off external drives in Finder Preferences so you don’t see the icons….much easier….

0 votes

James Bruce

That’s pretty awesome, though $30 for a bit of aluminium? Defininately a good alternative though – just not as technically fun as doing it over the network!

0 votes

Dave

I don’t have a home server, but with tons of photos and videos on my MacBook occupied by photos and videos, I knew I needed to do something. So I built a direct connect time machine.

I bought a Rosewill dual bay RAID enclosure, added two Samsung 500gb drives and set it up using Disk Utility as mirrored drives, set it as my Time Machine location and that was it! Now, when I come home from work, I drop the MacBook in my Henge Dock and don’t worry about backups anymore.

I’ve been using it for about a year w/o any issues. Cost was a little over $200, but I really wanted the mirrored RAID for redundancy.

0 votes

James Bruce

What’s this Henge Dock you speak of?!

I see.. http://www.hengedocks.com/

That’s actually really awesome, never seen those before. Good find!

0 votes

Mark

Works like a charm. Thanks! 

Will this still work if I upgrade to OSX Lion (which is due anytime this week – or next)?

0 votes

James Bruce

Hmm, I guess we’ll have to wait and see as I haven’t tested this yet, but I cant see any why it wouldn’t work – unless Apple has deliberately killed this hack, which is unlikely. 

0 votes

Brian Dao

I’m having trouble getting it to work on Lion GM, I had it running in Snow Leopard before though. Could someone else confirm if they are able to get it running in Lion?

The error message I recieve is “The network backup disk does not support the required AFP features.” Some googling reveals that some Lion users, using Time Machine with some NAS devices that use an older version of netatalk with a “less secure” AFP authentication implementation get the same error message. The solution in that case was to update netatalk on the NAS. We’re using SMB shares here so I can’t pursue that solution. Have they forced Time Machine into AFP network shares only? Is there a way to allow SMB shares for Time Machine? Is this even the problem?

Thanks for any help!

0 votes

James Bruce

Good question Brian. I’m afraid I dont have an answer for that yet. I’ve bookmarked your comment in reader though, so hopefully I’ll be able to re-address that at some point. 

It looks like apple may have removed SMB entirely from Lion, replaced by their own implementation of it. This is probably a good thing for regular samba shares, but possibly not for time machine backups. 

0 votes

James Bruce

Hi there. Are you using the old WHS by any chance? Reports seem to suggest that WHS2011 works with Lion, except for the fact that the “Launchpad” software provides by WHS overwrites the icon for the OSX app launcher of the same name (what a ridiculous oversight on MS part)

http://www.mediasmartserver.net/2011/05/05/guide-backing-up-your-mac-to-whs-2011-with-time-machine/