Update: Time Machine Backup to Windows Home Server



UPDATE: Version 3 directions have been posted on the site. It’s easier than using the Applescript that has been failing for people that had a Windows partition. You can find the version 3 here.

I thought it was about time to revisit an earlier post, which has been quite popular, on how to backup your Mac using Time Machine to a Windows Home Server. There have been many updates to Windows Home Server and Mac OS X that has complicated the process just a bit and therefor my previous directions no longer work. Below I will highlight a still fairly easy process to get your Mac Time Machine working with Windows Home Server again.

I was messing with Linux commands and doing research on creating sparse image files when I came across a site that simplified the process with an AppleScript. You can read about that script and directions here.

I have simplified the directions to work with Windows Home Server. This isn’t supported by Apple or Windows Home Server. While it works for me, it is still hacking and I can’t guarantee that things won’t go wrong.

1. Click here to download the AppleScript that will help in the process. Just unzip it we will use it later.

2. Download iTimeMachine. You will need to install it and enable AirDisks. There is also a linux command to do this. If you want to know just leave a comment and I will provide it for you.

3. Logon to your Windows Home Server and create a new folder for your Time Machine backup. I called mine JJ MBP backup. Make sure you give whatever user account you want to use access. Once created you can close out of the Windows Home Server.

4. Now we can start the preparing the backup folder. In the left sidebar in finder you should see your Windows Home Server. Mine is called “Server” and will be under “Shared”. You need to click on your Home Server, logon and browse to your newly created Time Machine backup folder. Double click on it so it will mount the folder. I also show mounted volumes on my desktop to make it easier.

5. Now that you have mounted your backup folder you need to drag that to the AppleScript you downloaded in step one. Since I have my backup folder show on my desktop and I placed the AppleScript on my desktop I just drag and drop. You can also see the mounted folder in finder and drag it to where ever you saved the AppleScript. It will run a little program that you will have to OK. Once it’s done you will see the AppleScript icon disappear from your dock.

6. The program is done now and it’s time to transfer the sparse image to your backup folder. The AppleScript saved the sparse image in your Home directory. Browse to it and then transfer the sparse image to your Windows Home Server backup folder. Mine was about 450mb so it won’t take long to transfer.

7. Now that the sparse image is on the server open time machine and point it to your Windows Home Server backup folder. You shouldn’t get the error about creating backup and it should start transferring files quickly. Depending on how much data you have it could take a long time for the initial backup. My 14GB took about 1.5 hours over wireless.

Bonus: To make it easier to backup the files create a startup item that mounts your Windows Home Server backup folder. Every time the computer starts it will auto-logon to the folder so Time Machine will work automatically. If you are not connected to your network you will get a error but I find it easier to deal with one error message when I’m away than trying to remember to connect so Time Machine will work.

Now you have your Time Machine backing up to your Windows Home Server. It’s not too many steps and thanks to that AppleScript it makes it a lot easier. The directions I was working on required a lot of time in the Terminal which would scare a lot of people. I didn’t even think about creating it in a AppleScript.

Let me know if you have questions. I have created a video below to help people follow the process I have outlined above. I hope everyone has success.



Related Posts:


If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

[...] UPDATE: I have created a new post with directions that currently work. You can find the new version here. [...]

[...] The good news is that he has documented a easy process to get your Mac Time Machine working with Windows Home Server again, and posted a video as well which you can find here. [...]

Hi,

I get Command exited with non-zero status when dropping mounted drive on top of file

Dean,

Did you make sure to unzip the applescript out? Also which version of OS X are you using? I tested everything with Snow Leopard. I’m not seeing anything in the AppleScript that would cause problems between 10.5 and 10.6 though.

Hi,

Will this permit a bare-metal restore (e.g. using the Snow Leopard install disk utilities to open time machine and restore the entire HDD?)

Thanks

Jonathan,

Yes and No. You can’t just put the install disks in and restore from time machine. Time machine won’t know about the network volume.

What you can do is enter terminal during install and re-enable network support. You wouldn’t be able to use the applescript so you would have to do it manually in terminal.

The other option is to install Snow Leopard completely. Once snow leopard is installed you enable Time Machine over the network. Then open Migration Assistant in the Utilities folder. From there you can restore your files back.

I haven’t tested it but I did open Migration Assistant and it sees my Time Machine backup.

Thanks for that Jeremy, I’ll give it a go then, at the moment I have a separate USB HDD setup and it’s a pain to remember to hook up to it every so often.

excited to try until… I unzipped the script onto desktop and dragged my mounted network volume onto it – it gives me error “hdiutil: create failed – error -5344″ – running SL 10.6.2 on MacPro 1,1, any ideas?

The error is when it’s trying to create the sparse image in your home directory. I would browse to the home directory and see if there is a sparse image in there. If there is check size? If it’s not in the 100s of MB I would delete it and run the applescript again.

If that doesn’t work let me know and I can give you the command to run in terminal to create the sparse image file.

I think I see the problem – I have 2 nics bonded. I manually created the sparse as “hdiutil create -library SPUD -size 1000g -fs “Case-sensitive Journaled HFS+” -type SPARSEBUNDLE -volname “TimeMachine for OZONE” “OZONE_0017f204bf9d.sparsebundle”", put in the TM network folder and started TM. TM tries to create a new sparse called OZONE.sparsebundle and ignores the one I created – it fails trying to create this sparse… I think my nic bonding is the cause of the problem as it can’t decipher the right MAC address… I’d hate to break my bond but I might have to try that – more later…

Let us know. I’m sure most people don’t have a bond but it will be good information to have. I have been trying to solve a completely different issue on a server that has a bonded connection. The MAC address seems to be the culprit.

Jeremy,

Along the lines of your response to Jonathan; I need to update a macBook with a new HDD (more space) and the most recent OS. I have an HP EX470 & so this was the sequence I was considering.
1. Update macbook from tiger to snow leopard
2. Use your method to create a time machine back-up of macbook onto HP EX470
3. Replace existing macBook HDD with new HDD
4. Install Snow Leopard onto new HDD
5. Use (what parts?) of your method to re-establish time machine connection to HP EX470.
6. Restore all applications & files from the earlier time machine back-up.
My concern is related to accidentally overwriting the earlier back-up or the new OS install not recognizing the earlier backup as belonging to it? Any advice?

Jason,

The EX470 has time machine support through HP. HP released the installers for time machine and Amazon s3 backup. It took some looking but the link below will take you to both exe files. So there is no need to do my steps above. The steps above are for people that build their servers.

http://h10025.www1.hp.com/ewfrf/wc/softwareList?os=1005&lc=en&dlc=en&cc=us&lang=en&product=3548165

You shouldn’t have a problem upgrading the macbook to snow leopard. Once upgraded run time machine to your HP EX470. Pull out your old HD and put in the new one and install Snow Leopard. After install, point to your HP to restore your files and applications from time machine. Since you’re pulling out your old HD you shouldn’t have to worry about losing files. If something does go wrong you still have your old HD with all your files on it. Don’t format it until you get everything working on the new drive.

I always enjoy learning how other people employ Windows Home Server. It is a great way to protect your data. However you are still vulnerable to physical disk failures and inadvertent deletions. I am wondering if you can check out a new CloudBerry Backup for Windows Home Server which provides you with another level of protection by copying your data to secure online storage powered by Amazon S3. You can download your copy at http://www.cloudberrylab.com/default.aspx?page=backup-whs

Nadya,
CloudBerry Lab team

[...] Time Machine to WHS [...]

[...] Time Machine to WHS [...]

Thanks for this tip. I am curious how a full restore would work in the event of a hard disk crash. Will the mac see the TM backup on WHS while booting from the install disc?

PS. I see the wife is a cards fan!

Sorry about my question earlier. I see it was asked previously. I am having problems copying the sparse image file to my WHS. It says I do not have the proper rights. I believe this is a known bug in Snow Leopard. I occasionally see it. Also, maybe I am missing it but when do you install iTimeMachine that you downloaded in step 2?

[...] about my update to getting time machine to work with Windows Home Server. You can find that post here. The show is in it’s 69th episode and they share a lot of good [...]

Jeremy,

Sorry for the delay in my attempt and reply.
I was able to upgrade the MacBook to Snow leopard (no problem). I was downloaded both EXE files you linked, created the add-in & installed on the EX470; also created the HP MSS Client.dmg, transferred it to the Mac, ran & installed the “HP Media Smart Server Software” onto the Mac. Supplied the EX470 name & password (no problems). Then a dialog asks for a backup disk size (default 150GB value) with an “APPLY” button. I accept the default value and “apply”, but after “Creating the backup Disk” dialog is about 7% complete, I get a “Backup disk creation failed” dialog with a “make more backup space available on the server then start the backup disk creation again” instruction. My EX470 has 1.9Tb of free space? Do you know where I am to make this adjustment?
Thanks for your reply.

Hey! I also am looking to do this backup method. I am running 10.5 though however I am getting an error when dragging and dropping the mounted drive onto the script. Again, I’m not running snow leopard, just regular leopard. Could this be the problem? and do you have any ideas to get around this? I’m using a PowerPC mac for this as well if that information helps.

I’m also seeing the Error 5344 issue that Mark was reporting, my NICs arent bonded. Not sure what the issue is, looking forward to any help as this solution looks great, if I can get it to work.

Jason,

The default size has to be as big as your Mac HD. 150GB is probably not enough. Plus you will want to keep more than just one backup with Time Machine. If you have the space I would give at least 500 if not more. I don’t have a MediaSmart so I have never walked through the setup process.

Mike,

What error are you getting? That might help with figuring out the problem.

Matt,

The 5344 is error creating the sparse image file. I would try to remove the admin password. Just leave it blank. It could be failing on admin rights. Also make sure that it didn’t create a partial sparse image file in your home directory.

Jeremy,

Thanks for the advice, but I’m not sure which admin password I should leave blank. I’m also on a Mac Pro, 10.6.2, no partial sparse image file. I feel as if I’m missing a step, yet I’ve been over the instructions several times so forgive me.

I’ve logged into WHS as admin and as another user with rights to the backup folder, and tried several things on the osx permission side with no luck.

Matt,

Even though you don’t have the NICs bonded there are still two. The applescript is trying to get the Mac Address automatically to use but since there are two it’s confused and failing. I would try disabling Ethernet two, restart, and then try to run it again. Once everything is setup it should be fine to re-enable ethernet two. I didn’t realize so many people had Mac Pros. I would love to have one at home, especially since I use one at work.

[...] Time machine to Windows Home Server – This post or few posts have been top for awhile now. The latest update is listed as top 15 [...]

Hi

When I try to create the sparse with your applescript, i get this popup window message:

hostname: illegal option –f
usage: hostname [-s] [name-of-host]

appreciate your help here. Thanks!

Thanks for this great post, Jeremy. Following your instructions I was able to start using Time Machine with my WHS in a matter of minutes, and have been backing up successfully for about a week now.

when I drop the share onto the apple script it says hostname: illigal option — f
usage: hostname [-s] [name-of-host]
I have the option to edit or ok.
sorry not sure whats wrong.

Running 10.5.x here and getting the “hostname: illegal option -f” error as well. After fixing that I get a similar error on the “mv” command. While I’m familiar with the command, I got a little lost with all the string cat going on and so didn’t mess with it. Anyone have a working version yet? Thx

Hi, I also have ““hostname: illegal option -f” error as well”.. any idea? Thanks a lot. (I run 10.5.8)

After the initial backup, can future backups be done over the internet remotely?

Hi and thanks for this unique how-to!! I have been trying to get Time Machine backup to work with my WHS for so long now, but this is the first time it works! Perfect result and an easy read!! Thank you!

Greatly appreciate the work done here, Jeremy. My MACs were the only computers left in my network that I have not been backing up to WHS.

Having a problem with my MBP, however. Have followed your instructions and I drag my share to the script and I see it creating the sparse image in my home directory and it grows and grows – getting up to 600+MB and then, boom: the script stops, my mount on the desktop disappears (along with the other shares in the network) and the sparse image file disappears.

Running 10.6.2 networked over Wifi-N. Wondering whether this file is getting to big and choking something?

Hi, I haven’t tried the steps but am curious how do you prevent TimeMachine from filling the entire disk once it is setup since neither TimeMachine nor WHS seemed to have a way to restrict the max backup size.

So, to me it seems the time machine backup folder will keep on growing till it fills my entire storage before it starts deleting older backups.

An update on my problem…

I switched from Wifi-N to Wifi-G and was able to get it to create the sparse image. Then I had a problem copying the image over to the WHS share. I tried switching from N to G and back to N and rebooted the MBPro and still had problems… it would start copying and then it would give me an error.

I rebooted the WHS, reconnected and then I was able to move the image file over to the share and now I am off and running… Time Machine is backing up about 150GB as I type.

Rhettt,
Seems that the script is having trouble getting the mac address of either wireless card or ethernet port. I’m glad you got it to work.

Ron,
Time machine can only grow to whatever your first disk in WHS is. That might be a issue as it could take a lot of space but knowing I have a backup is more important. You can always go into the time machine backup and delete old backups if you are concerned about space.

Steven,
Backups can’t be done off of your home network. With that said it is possible but would create a lot of work setting up a VPN network or mounting the WHS share by IP and setting your router to forward. I won’t be going over those steps. At least not at this time.

If you are running into issues you can always edit the applescript. It seems it is getting stuck on the mac address for network. The applescript tries to find it for you but you can set it manually in the applescript.

Jeremy,

It worked for the first backup, but now when Time Machine runs, it gives an error:
“The backup disk image “/Volumes/RHETTMACPRO-3/XXX.sparsebundle” could not be accessed (error 109).”

XXX is just a long string for the name of the sparsebundle file.

The drive/volume is mounted fine – have tried restarting OS/X and still not sure what to do.

[...] =) I will be backing up the machine using a WHS so I'll probably use the script described here: Update: Time Machine Backup to Windows Home Server I'm still looking at covers, but it looks like the Speck Satin covers haven't come out yet, so [...]

[...] My Macs have no problem accessing or writing data do it thanks to Macfuse and NTFS-3G. Thanks to this post at Multimedia-Pc.com I’m able to use the server for Time Machine. My WHS is now my computer [...]

Hi – great how to – thanks.

I have a question… does your script create a limit on the size of the Time Machine backup or will it just keep growing?

Jon

Jon,

It will keep growing as long as you have disk space. If you set it up it’s something you will have to manage. If you get low on space on your WHS go in and delete the oldest monthly backup.

Jeremy i am at a loss i cannot for the life of me get this to work i am getting the same error as a few other,(“hdiutil: create failed – error -5344″)

i am running snow leopard on a new iMac i7 , i have also tried it on my macbook air 1.8 and my macbook pro 17″ 2.8 all running Snow leopard

i am pretty new to the mac world i am not very well versed in editing scrips yet… im not a newbee to cmd on windows so terminal doesnt scare me but as with editing scrips its a bit out of my mac knowledge

could you possibly run me through what u think i should do? maybe personalize it for me? because the general info i have obtained here is just not working and i have no idea why but i have over 21 TB of space sitting on my WHS that would make me very happy to be able to use to back up my mac’s

Configuration

2 iMac i7 2.8, 1TB HD ,16 GB Ram

1 MacBook pro 2.8, 500GB HD, 8GB Ram

1MscBook Ait 1.8, 120GB SSD, 2GB Ram

Custom built WHS i7 Black 3.2,Asus P6t6 WS,8 GB Ram

StorageWDC WD10EACS-00ZJB0 932 GB HEALTHY
WDC WD10 EACS-00ZJB0 USB Device 932 GB HEALTHY
WDC WD10 EACS-00ZJB0 USB Device 932 GB HEALTHY
WDC WD10 EACS-00ZJB0 USB Device 932 GB HEALTHY
WDC WD10 EADS-00L5B1 932 GB HEALTHY
ST320005 42AS USB Device 1,863 GB HEALTHY
ST3750640AS 932 GB HEALTHY
WDC WD10 EACS-00ZJB0 USB Device 932 GB HEALTHY
WDC WD10 EACS-00ZJB0 USB Device 932 GB HEALTHY
WDC WD20 EADS-00R6B0 USB Device 1,863 GB HEALTHY
WDC WD20 EADS-00R6B0 USB Device 1,863 GB HEALTHY
WDC WD10 EADS-00L5B1 932 GB HEALTHY
ST320005 42AS USB Device 1,863 GB HEALTHY
Hitachi HDS721010KLA330 932 GB HEALTHY
Hitachi HDS721010KLA330 932 GB HEALTHY
WDC WD10EACS-00ZJB0 932 GB HEALTHY
Hitachi HDS721010KLA330 932 GB HEALTHY
Hitachi HDS721010KLA330 932 GB HEALTHY

thank you very much for any time help and consideration you can give me in this matter

Enigma,

First of all you have a sweet setup. The error that you are getting is because it is already seeing the sparse image file in the home directory. Check your home directory and make sure it’s not that. The file should be in the 100s of MBs. If it’s there transfer it to your WHS. If it’s there but the file size is only in 100s of kbs, delete it and run the script again.

The script just closes and some people think it didn’t go through. When it closes the sparse image file should be in your home directory.

Let me know what you find.

Hey Jeremy

Thanx :) the specs are what they are but its more impressive in pictures lol that’s just my mac side of things i have a 7 monitor setup on the windows side of things running

i7 960 3.2
Asus P6T6-ws(6PCI-x Slots)
16GB RAM
2TB WD Green

1 ATI 4870 X2 PCI-X
3 ATI 4850 PCI-X

1 50″ Samsung 9 series (touch of color)
2 30″ Samsung Sync Master
2 27″ Samsung Sync Master
2 21″ Samsung Sync Master

here are some photos :)

files.me.com/enigmatai/bofw91

files.me.com/enigmatai/bbak3y

ok back to business

i have confirmed that there is nothing in my home directory. just to be sure i opened the directory side by side with the script, upon initiation of the script i see the sparse file start to form in my home directory and then the error comes up, after i cancel the error message the sparse file that was being created disappears???

i have confirmed the above on all machines? what am i doing wrong?

Enigma,

I’ll look into it this weekend. I need to be on my home network to try things out.

thanx Jeremy

if u need anything from my end let me know…

Enigma,

Well my new 27″ iMac had the same error. Took some time but I have a complete GUI fix.

First forget the AppleScript completely. Something changed in the hdiutil command and I didn’t feel like reading the man pages to figure it out. My other thought was it was people that had Windows partition, like my iMac.

1. Open Disk Utility in the Utilities folder.

2. Select the Macintosh HD, then go to “File” -> “New” -> “Blank Disk Image”.

3. A box will come up with a lot of different options. The save as name is important as Time Machine will use that name to see if it’s correct. The save as name should be machinename_macaddress. For example mine is jeremy-iMac_0a0a0a0a0a0a. I’m not giving my MAC address but that’s what the 0a stuff is. You can find the name by going to sharing in system preferences or types hostname -fs in the terminal. The MAC address is for the connection that will be used for Time Machine. My laptops are wireless, my desktop using ethernet.

4. Name = whatever you want. I called mine Time Machine.

5. Size = Over your total data amount. Right now I set mine at 400g. With Disk Utility you can resize this later if you fill the amount.

6. Partition = Single Partition – Apple Partition Map

7. Image Format = sparse bundle disk image

8. Now create the image. Default is to save to your desktop.

9. Transfer that disk image from your desktop to you time machine folder on the WHS.

10. Point time machine to your WHS folder and start the backup.

This might be a few more steps but still very easy. I like it better than the applescript. You will need to do a different sparse image per machine you want to use. I have each Mac in my house use a different folder on the server to keep the sparse image files separate.

Let me know how it goes. It worked great for me after receiving the same error you got.

JEREMYYYYYYY!!!!!!!!

THANK YOU!!

like you i also have all my macs with windows partition and yes this worked flawlessly it is backing up as I type

no script needed

step by step exactly as you wrote it nothing else required

anyone else having this problem this is the solution

i am backing up 4 macs 2 iMacs hardwired and 2 wireless MBP and MBA all of them working now so i cant see anyone having a problem with this now

thank you very very much for all your time and help my friend i appreciate it a lot

Enigma,

So glad it worked for you. I’m going to get a new post with the new instructions up so people don’t run into this issue.

Jeremy

i have one more question for you

while creating my sparse image i ran into a limit to the size i was able to create the image

my Hd is a 1tb i was only able to use 430GB as that was all the Free space i had available on my HD

i tried to set the save location to my server Share and it started creating but said could not create the image on the file system selected so i just went ahead and created it on my desktop at the 430 GB limit

the reason i went ahead is you had posted in step 5 “” Size = Over your total data amount. Right now I set mine at 400g. With Disk Utility you can resize this later if you fill the amount.”"

all is well but i would like to now go back and make the Sparse image 1TB

how do i edit the size of the sparse image on my WHS?

Enigma,

From your mac go into your time machine backup folder and double click on the sparse image file. It will mount the file. Then go into disk utility and you will see the sparse image file in there. Highlight it and at the top there is a button to resize. I tried it tonight and it worked fine.

My WHS is completely full now since my iMac was full of videos.

lol OK that’s a little embarrassing simplicity killed the cat?? (my egos the cat) lol

thanx jeremy

Sweet, the last few posts fixed it all.

Thanks!

Thank you Jeremy I now have it all working.The only mistake I made was when creating the disk image, one of the boxes said “Format”, I left it at the default Extended Journaled, This did not work. I made another disk image with the format set to Extended (Case Sensitive) and it all works very well.

Thank you once again for your clear instructions

Jeremy,

My setup is imac i7 (including parallels windows virtual machine) wirelessly connected to an airport extreme that is in turn connected by gigabit LAN to a WHS box

For anyone else that has my setup please ensure you use the mac address of your ethernet in your imac, not the airport, or this will not work.

Best article I found is linked below. It works a treat:
http://www.levelofindirection.com/journal/2009/10/10/using-a-networked-drive-for-time-machine-backups-on-a-mac.html

Hi Jeremy,

Is the command to enable Time Machine over network

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

If so then I shouldn’t have to install iTimeMachine. Is that correct?

I remember trying this back in mid 2009 when I first I my Macbook Pro and it did not work. I hope to have better luck this time.

Thank you

Ken,

That command is the same thing that iTimeMachine does. If you have a Windows partition use the directions I wrote up for Enigma in the comments above.

Hello!

Would you please, give a hint on how to limit the folder size where Time Machine keeps its back ups?

I am also having an Error 13 message when trying to back up my data to Acer h340 WHS server. What can be the problem here?

All is fine now. It was just a matter of terminology interpretation that did not allow me to set everything at once.

Thanks for the notes.

Hi Jermey, Works great! Thank you!

I’d create the sparse image using my WiFi MAC address, Time Machine appear to start preparing a backup then it would fail with a error code. “The backup disk image “/Volumes/backups/Ken.sparsebundle” could not be created (error 45).

Then I tried creating another sparse image using my Ethernet MAC address and everything was good despite I am using my WiFi to backup.

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

I did noticed on your video, when you copy that sparse disk image to your WHS, it was 2-3 times faster than my. For some reason, whenever I copy from my WHS, it’s fast but writing to my WHS, it’s super slow. Any ideas why this is?

Thanks again.

Ken,

I use wireless N at home with a gig connection to server. Also I don’t duplicate my Time Machine backups. Duplication will slow down file transfer.

Jeremy,

I have the same connections as you with Wireless N, Gig interface for WHS, and no file duplication.

This is slow writing speed to WHS happened when I use a Mac but other Windows machine, it’s fine. I came to the conclusion it from the Mac to WHS. Did some googling but no luck.

Ken,

I couldn’t find anything either. I would look at the event log and task manager while doing a backup. See if anything shows up out of the ordinary. You might also check to see if there is a new network driver for the WHS.

Hi Jeremy,

Thanks for posting this. It worked great for me too.

I received an error when creating the sparse file via the script about not having assistive device support, but a quick google led me to the Universal Access page within preferences where enabling this was just a check box. This done it worked fine.

Cheers
Steve

I have spent all night trying to get this working, but no go…
I am a Pc user, so maybe I am a little apple dumb.. but can someone please help me.

I got everything going well, just..
nothing shows up in time mac hine… do i need to reboot?

and where does it copy that file t after it finishes…
I can’t find it anywhere

on open names
set volumeName to names as text
set macAddress to (do shell script “ifconfig en0 | grep ether | tr -d ‘\11′ | sed s/ether// | sed ‘s/ //g’ | sed s/://g”)
set hostName to (do shell script “hostname -fs”)
tell application “Finder”
set theSize to round (((“3000″) / 1024 / 1024) / 1024)

this is the area I am having problems with, is this supposed to be the servers mac and hosr or the macs or what, omg please please help me.

on open names
set volumeName to “time”
set macAddress to (do shell script “ifconfig en0 | grep ether | tr -d ‘\11′ | sed s/ether// | sed ‘s/ //g’ | sed s/://g”)
set hostName to “MacPro”
tell application “Finder”
set theSize to round (((1024) / 1024 / 1024) / 1024)
end tell

do shell script “defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1″ with administrator privileges

do shell script “sudo hdiutil create -size ” & theSize & ” -type SPARSEBUNDLE -nospotlight -volname \”Backup of ” & hostName & “\” -fs \”Journaled HFS+\” ~/” & hostName & “_” & macAddress & “.sparsebundle” with administrator privileges
do shell script “mv ~/” & hostName & “_” & macAddress & “.sparsebundle /Volumes/” & volumeName & “/” with administrator privileges

tell application “Finder” to eject volumeName

tell application “System Preferences”
activate
end tell

tell application “System Events”
tell application process “System Preferences”
set frontmost to true
click menu item “Time Machine” of menu “View” of menu bar 1
end tell
end tell

end open

thats my moded script, but time machine just sees the same dive 1.3gig free of 6 teratbytes.

First forget the AppleScript completely. Something changed in the hdiutil command and I didn’t feel like reading the man pages to figure it out. My other thought was it was people that had Windows partition, like my iMac.

1. Open Disk Utility in the Utilities folder.

2. Select the Macintosh HD, then go to “File” -> “New” -> “Blank Disk Image”.

3. A box will come up with a lot of different options. The save as name is important as Time Machine will use that name to see if it’s correct. The save as name should be machinename_macaddress. For example mine is jeremy-iMac_0a0a0a0a0a0a. I’m not giving my MAC address but that’s what the 0a stuff is. You can find the name by going to sharing in system preferences or types hostname -fs in the terminal. The MAC address is for the connection that will be used for Time Machine. My laptops are wireless, my desktop using ethernet.

4. Name = whatever you want. I called mine Time Machine.

5. Size = Over your total data amount. Right now I set mine at 400g. With Disk Utility you can resize this later if you fill the amount.

6. Partition = Single Partition – Apple Partition Map

7. Image Format = sparse bundle disk image

8. Now create the image. Default is to save to your desktop.

9. Transfer that disk image from your desktop to you time machine folder on the WHS.

10. Point time machine to your WHS folder and start the backup.

Ugh, this has been a very long night, thank you for your quick responce, i’ll let you know if it works….

Woot, looks like it’s going, thanks very very much.

Says it could not make the time machine image available…

the backup disk is not available.

Ah ha, looks like I got it,
I was originally doing this on another whs , and had the share names mixed up, it seems.

Hi, I’m hoping your still up,
I keep getting, backup disk not available…

whtat giveS?

this is really weird, so… when you posted.. it worked. the first time i did it..

it was a week ago though, and it worked, and was backing up, so i left, and let it run… I am doing this for a freind… and.. they said it error’d in the end.. and now, i can’t get it to work no matter what.

this is really frusterating.

I am not using any semi collins to seperate the mac addrss, th macs name is MacPro, so it’s

MacPro_a2a2a2a2a2a2

sooo frusterating…

although, the hostname thing gives me MacPro.local… do i need to include the local?

God, I had this all set up, and it was working, and now for some reason it just wont, UGH! so frustrating.

I go it, I had to run

do shell script “defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1″ with administrator privileges

again, i am guessing, this has to be done each boot.

Jeremy,

I’m getting the same error that an earlier poster experienced.

It’s the “hdiutil: create failed – error -5344. I looked in my user directory for another sparse image but didn’t see it.

Can I get the terminal commands?

Thanks!

Try the steps below. It forgets the applescript and commands completely. Lost of people have had success with it. I had to use the below on my iMac because it has a Windows partition.

1. Open Disk Utility in the Utilities folder.

2. Select the Macintosh HD, then go to “File” -> “New” -> “Blank Disk Image”.

3. A box will come up with a lot of different options. The save as name is important as Time Machine will use that name to see if it’s correct. The save as name should be machinename_macaddress. For example mine is jeremy-iMac_0a0a0a0a0a0a. I’m not giving my MAC address but that’s what the 0a stuff is. You can find the name by going to sharing in system preferences or types hostname -fs in the terminal. The MAC address is for the connection that will be used for Time Machine. My laptops are wireless, my desktop using ethernet.

4. Name = whatever you want. I called mine Time Machine.

5. Size = Over your total data amount. Right now I set mine at 400g. With Disk Utility you can resize this later if you fill the amount.

6. Partition = Single Partition – Apple Partition Map

7. Image Format = sparse bundle disk image

8. Now create the image. Default is to save to your desktop.

9. Transfer that disk image from your desktop to you time machine folder on the WHS.

10. Point time machine to your WHS folder and start the backup.

Thank you for your expeditious reply.

It worked like a charm!

So I’m pretty new to Mac. How would I go about creating a startup item?

Richard,

Go to system preferences and click on accounts. You will see a tab at the top called login items. You can drag and drop the folder in there. When the computer boots up it will mount that folder.

Hey Jeremy, Remember I had the slow issue of copying files to WHS? I don’t know why I didn’t think of this but it was Nod32 Biz edition scanning my files. As soon I disable real-time file system protection, it was smokin…

Thanks for trying to help.

Why I didn’t think of the antivirus because from PC to WHS no problem. But from the Mac to WHS, sloooow.

Here a silly question. Let just said my hdd or I want to reinstall everything including OS X. I assume I should be able just connect to my WHS and recover all my files. Right? The only thing I am backing is only docs, music, etc. No apps.

Thanks

[...] since 2008 on getting the current Windows Home Server to work with Mac. You can see version 1, 2 and 3. It’s obvious by the 10s of thousands of visitors to those pages and the numerous [...]

Leave a comment

(required)

(required)