Thursday, February 10, 2011

How to Enable TimeMachine Backup for your MAC to your Windows Small Business Server 2011 Essentials or Windows Home Server 2011

Well, I don’t often dabble around with a MAC, I just can’t get used to the single mouse button and pressing a key on the keyboard for a simple context menu.  I’ve quite possibly been assimilated to Windows.  However,  protecting your data is important, even if you are on a right-click less product.

As you probably know by now, the Release Candidate of both Windows Small Business Server 2011 Essentials, and Windows Home Server 2011 is now live. Which means you can download and install them!!  You should take a moment and do that now.  I’ll wait.

Once you have these installed, you can easily add your Windows based PC to the server and to the PC backup by simply going to http://server/connect on your client PC.  Click the install for Windows PC button and follow the instructions.  Windows PC’s are automatically added to the backup which takes place in a round robin style nightly.  When you’re on a Mac, it’s the same thing, but you click “Install for Mac”, you end up with a launch pad and access to the server, but no default backup.

It has to be possible right? I mean everyone knows that a MAC is really a *nix box with a really fancy UI (and no right-click).

Poking around on the Internet, you can find some steps, like how to get unsupported volumes to appear to the TimeMachine engine, with the help of a friend (thanks Fabian & Craig) we’ve managed to put together these steps, which work for both Home Server 2011, and SBS 2011 Essentials:

  1. First, create an SMB share on your server using the share permissions wizard, let’s call it Mac Backups.  Make sure the users who are on a Mac have Read/Write access.
  2. Change the Mac TimeMachine to show unsupported Network Volumes by going to Finder, then Applications, Utilities, Terminal.
  3. Inside the Terminal, type this command defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1.  This sets the showing of unsupported network volumes to TRUE.

 Showing Unsupported Network Volumes

  1. Obtain the MAC’s MAC Address. A MAC Address is the hardware address of the local network card.  It’s important to choose the MAC address of the built in wired connection.  To obtain this, you can run the command from the terminal: ifconfig | grep en0.

 Finding the MAC Address

  1. Next (and this is the confusing part, so bare with me) we need to create a sparse file on the MAC and copy the server share.  A sparse file is a file that you define a CAP size, but it will probably take up much less (we’ll define it as 200GB in this example).  This file creation process is a little tricky.  To do this, type in to the same terminal above: command ‘hdiutil create –size 200g –fs HFS+J –volname “<CLIENT_NAME> Backup” <CLIENT_NAME>_<MAC_ADDRESS>.sparsebundle’ Where the MAC client is called <CLIENT_NAME> and the MAC Address on the primary wired connection to the MAC is <MAC_ADDRESS>.  This means if you’re client name was OSX, and your MAC address is 00:00:1F:12:82:92, then your command would be: command ‘hdiutil create –size 200g –fs HFS+J –volname “OSX Backup”  OSD_00001F128292.sparsebundle’  .  Here is what it looks like this client is called “macmini2” and has a MAC address of 34:15:9E:09:00:94


Sparse File Created

  1. Copy this file to “\\SERVER\Mac Backups\” that you created earlier on the server. As you probably know if you are a MAC user, you have to mount the volume:

 Mount the Server Share on the MAC

  1. Load up the Time Machine settings from within System Preferences, and the sparse file you created above should be in the list.  Select this as the target for your backups.  This will have every TimeMachine backup backup directly to a share on the server:

 Configuring TimeMachine to use the sparse file

  1. Repeat for all your Mac computers on your network.

Once you have completed these steps, your MAC will start using the Windows Home Server 2011 or Windows Small Business Server 2011 Essentials as the backup TARGET.  This means it will back up over the network using the built in timeline functionality, on the schedule you define inside timeline.

What is also cool, is while the MAC won’t show a percentage complete like the PC does when performing the client backup, it will tell you the status right in the console, which of course falls through to the alerts.

Mac Backup Successful:

Mac Backup Successful

Mac Backup Unsuccessful:

Mac Backup Unsuccessful

So there you have it, How to backup a MAC to a Windows Home Server 2011 (aka Vail) or Windows Small Business Server 2011 Essentials (aka Aurora) Server.

For reference, here is the team reference for WHS v1


18 comments:

snowdins said...

This makes no sense. 2011 is supposed to come with this functionality built in. You expect home users to do these convoluted steps while your software is broken?

Whats going on here?

Anonymous said...

snowdins: your an asshole and/or what an asshole comment. The author of this article is publishing a workaround, not setting expectations. Maybe you should adjust your expectations.

Tim W. said...

I have a Mac and i have a right Click!

http://www.apple.com/macbookpro/features.html
"If you’re coming from a right-click world, you can right-click with two fingers or configure a right-click area on the trackpad."

http://www.apple.com/magicmouse/
"Magic Mouse functions as a two-button mouse when you enable Secondary Click in System"


Do you guys on Windows Machines keep Features or do they get less after an new Version?

Anonymous said...

I just got my first mac and i must say i am suprised by how much i like it. I thought I was a die hard windows guy... Thanks for the guide on getting WHS to be a Time Machine Target. I was able to do a bare metal restore by copying the backup to USB and then plugging directly into the mac. Worked well...

Armin said...

What's all the babble about "right-click"-lessness? I use right click all the time on the Mac, it's there and not at all different from a Windows machine.

Confuzyon said...

The instructions above are slightly wrong. First off ifconfig| grep en0 DOES NOT return your MAC address. The address listed is actually your ipv6 ip address. (You'll notice that the format does not match. A MAC address looks like "00:00:1F:12:82:92" whereas an IPv6 address looks like "fe80:3615:9eff:fe09:94".

To get your MAC address just type "ifconfig | grep ether". If more than one is listed then generally speaking the first one is if you're using a wired network connection and the second is a wireless connection. If you have more than that then you are doing something interesting and probably know which one to pick.

Second the hdiutil command issued does not create a sparsebundle! The correct command is "hdiutil create –size 200g –fs HFS+J -type SPARSEBUNDLE –volname “ Backup” _.sparsebundle". Otherwise you may get a disk full error like I did if the size you choose is bigger than the size on your mac hard drive.

As far as the size to choose make it at least about 1.5 times the size of your hard drive. This will give it enough space to backup your entire hard drive and then include history. There is no harm in going with more space because then more history will be available to you but I would say that's a minimum.

Anonymous said...

I get command not found when I run the spare command, I have also tried the command that Confuzyon added both say command not found.

BillyPrefect said...

Dear lord thank you sir!!!
Site after site with different suggestions and instructions and finally this site actually pulled up with a legitimate Time Machine running as I type this!

One thing though... I took out the single quote marks, before hditutil and the after sparsebundle - I don't know why, but I had to.

Thanks muchly!

Bill K said...

Hi,

This worked flawlessly on Snow Leopard for me. Lion kills it. Apparently, Lion disables a security protocol this depended on. I tried setting up an NFS share to make it work, but haven't been successful.


Bill K.

nathaningram said...

I can also confirm that Lion breaks this fix which had been working splendidly. Now I am unable to mount the remote volume.

Error: "The network backup disk does not support the required AFP feature."

Apparently this is due to Applerequiring that all NAS devices support the new Netatalk 2.2 protocol instead of any older versions.

Any ideas?

Seanpt said...

Since Lion broke this I've changed my methodology. I'm using the free iSCSI Software Target to create iSCSI drives for the Apple computers to connect to.

Happy days

Anonymous said...

Why not just create your sparse image in Disk Utility?

asudduth said...

@Seanpt (or anyone) I know about the MS iSCSI target -- sounds like a great idea. What are you using on the Mac as an iSCSI initiator to connect to the target? (or does Lion have that built-in? I had heard it didn't)

asudduth said...

follow up question... what iSCSI target are you using? It doesnt look like the MS one is supported on WHS (Only standard, enterprise, etc

Seanpt said...

I was using S2008R2 and the MS one.

GlobalSAN was the OS X iSCSI target software I was using.

Anonymous said...

Thanks for the guide, working it through the only complication I have is where the Sparsebundle file is to copy it to the WHS?

When I run the command from the original Guide not the Confuzyon comment I get nothing more just a > symbol appearing.

Am I missing something I am not MAC savvy but do know commands and such.

Also when I run the Time Machine to Backup to the mounted WHS Share I can see a .tmp.sparsebundle file and folder created in the shared folder but then they disappear and the Backup Fails with a "The backup Disk image could not be created"

Any thoughts or guidance, I am this close to resolving this I can feel it.

WHS v1 and MAC OSX 10.5.8

Thanks

Anonymous said...

I ran this script and it's working, got round AFP error :)

http://zerga.dyndns.org/wordpress/2011/10/13/howto-get-macosx-lion-time-machine-to-backup-on-a-samba-share/

Anonymous said...

STOP SHOUTING!

Mac is short for Macintosh. There's no need to capitalize every letter. It's not an acronym.

It gets especially confusing when you start talking about MAC addresses in the same sentence!