Time Machine Backups to a Windows Server in Mountain Lion

Since I moved to a MacBook as my laptop a couple of years ago, I’ve had one continuing problem with backups.  In my mixed Windows/mac environment I’ve used an HP MediaSmart Windows Home Server as my file storage solution for both systems and mostly that’s worked well.

At first Time Machine backups from Snow Leopard to this server worked fine as the HP server included software that allowed it to function as a native Time Machine destination.  That stopped working with the changes that Apple made to Time Machine in Lion.  HP being HP, they never updated their tools to work with Lion.  Once I upgraded to Lion I found no good alternative so I changed to the use of an external USB drive to store my backups.  I never really liked this solution since it required me to remember to plug in the drive on a regular basis. It also ran slowly at times and I didn’t like that it put part of my backups in a different place than the rest of them.

I finally found a solution that is not perfect, but is as close I’ve gotten.  Recently I had to redo this when the disk that held the backups had some issues because of a bad hard drive on my server and thought it worth documenting. It’s been more than a year since I set this up so I can’t provide the links to the blog post that got me thinking this direction so unfortunately I can’t credit them.  Still this is how to create a pretty good TimeMachine backup destination for a Lion or Mountain Lion Mac to a Windows Server.  In fact it should work with any storage that is network accessible and doesn’t natively support updated Apple’s AFP protocol.

This works by creating an Apple disk image on a server share.  This is the same concept used by VMWare and Parallels to create disk images for virtual machines.  Here though we’ll set up a disk image that we can later mount from our Apple that works as a destination for our backups.

  1. Start the Apple Disk Utility.  Easiest way is to bring up Spotlight and start typing in Disk Utility.
  2. Make sure that you do not have a drive selected and click New Image…
  3. I had problems creating the disk image directly on the external storage. When I tried creating the image on the remote storage it would never mount correctly. Instead I created the disk image on a local drive and then moved it to the server share.  This would normally be a problem since we want our disk image to be large enough for our backups and therefore want it at least as large as our hard disk.  To work around this, and save storage space until it’s needed, we’ll create a sparse bundle disk image.  This type of disk only allocates space when it’s needed.  It will run slower than a preallocated image, but I’ve found the difference isn’t noticeable.
  4. Now give the image a name.  I used MacBook-Backup for mine.  You will need this name later, so make sure it’s easy to type.
  5. Next skip ahead in the dialog and change the Image Format to sparse bundle disk image. This lets us create a disk image that will grow over time so we do not need to allocate all the space at once. It also let’s me allocate a 1 TB backup disk and still create it on the 500 GB SSD in my MacBook.
  6. You’ll want to size the image based on how much you have to backup and how long you want to be able to go back to retrieve data. Since I’d been using a 1 TB USB drive I decided to create the image the same size and found that’s worked well for me. Under the Size dropdown select Custom… to enter any size that you’d like.
  7. For format the default Mac OS Extended (Journaled) works fine so leave it.
  8. Encryption is optional.  For an actual portable disk like the USB drive I’d consider encryption a necessity.  With a network stored file the question is how much you trust the other people who may have access to your server.  If you want to be safe, 128 bit encryption works well.  I’m using it on my backup.
  9. You can create the image anywhere on your computer.  I gave it the name MacBook-Backup.sparsebundle to make it clear what it was.  Again since it’s a sparse bundle it will only initially use a small amount of disk space regardless of the size of the disk image.
  10. Once Disk Utility finishes creating the image, unmount it, and move it to your remote storage.  In my case I created a new share on my server and gave my account read/write access to that share.  I then moved the file into the share.

With the image file now on my storage, I next had to tell my Mac where this file was and to use it as the Time  Machine destination.  If you try to do this through the GUI as normal you’ll see that only external drives and AFP supporting devices (generally either a Time Capsule, Airport Base Station, or NAS with the necessary support) show.  Instead we need to use the tmutil command to tell Lion where this image file is

To do this I found the easiest approach to first mount the image to your computer.  To do this connect to your external storage where you placed the file.  In my case this was a cifs share and I mounted it using the Go -> Connect to Server… option in Finder.  Once I did this it and I entered my login credentials I could see the disk image.  To mount the image double click on it.  If you created an encrypted image you will be asked for the password.  You can choose to store the password in your keychain so you will not need to enter it each time.  Once the image is mounted, you will see it in Finder under Devices much as you would an external drive.  The name will be the image name you entered in step 4 above.

If you want to move any existing Time Machine backup you can do so.  Apple provides instructions to do this at https://support.apple.com/kb/HT5096.  In this case the disk image functions just as an external drive would.  It takes time, but allows you to keep your existing backup data.

Next start Terminal.  At the prompt enter the following command to tell Apple where our Time Machine destination will reside:

sudo tmutil setdestination /Volumes/Mounted Image

Change Mounted Image to the name of the device in Finder after you mounted it.  In my case since I gave it the name MacBook Backup in step 4, my command is:

sudo tmutil setdestination /Volumes/MacBook-Backup

Try running a backup now by going to the TimeMachine icon and select Backup Now.  Depending on how much data you have on your Mac and the speed of your network it might take a while.  If you have a lot to backup the first time doing so with a network cable instead of wireless can speed it up significantly.  If you have an existing backup it may be faster to transfer it to the new image which will allow the backup to pick up from there.

After a few days this is working well.  I’m now getting regular backups instead of only when I remember to plug in the USB drive and have the time to let the backup run.  I’ve found the backups over my wireless to be much faster than over the USB 2 in my MacBook.  I also feel more confident my backup is up to date and will cover if something happens to my laptop or hard drive.

It’s not perfect though.  Since this is for all purposes an external drive it functions much as connecting a physical drive and not as a network destination.  To kick off the backup, you must manually attach to the server and mount the drive. I’ve also found that when networks other than my home, I get errors about not being able to connect to the storage when the Mac attempts to start the backup. I’ve generally just ignored these since there seems to be no problem other than the error message.

What I Want in IOS 6

By the time IOS 6 likely comes out in the fall I’ll have been using IOS for two years.  Overall I enjoy my iPhone and iPad in spite of the occasional quirks.  No technology is perfect and I’m too much of a technically minded user to ever completely like any system that I didn’t create.  With IOS 6 likely to be announced soon, I thought I’d throw my two cents on the changes I’d like to see in the next version of Apple’s mobile OS.

A Common Documents Storage

Many of my annoyances with IOS would go away with this single change.  I’m not talking about a full file system access to everything on the device, but just a single document area that all apps can access.  I want to be able to create a file in QuickOffice and be able to edit it in Pages.  I want to be able to save a file as a PDF in one app and then read it in GoodReader later.  The independent silos where all apps are self contained mean I often have the same file on my device multiple times.  I think this is the biggest obstacle to using the iPad as a creation device.

Another thing a centralized document system would allow are easier email attachments and multiple attachments to an email.  Imagine being able to email two photos at the same time to someone.

Better Data at a Glance

With IOS an icon generally tells me nothing other than I can tap it to start an application.  I can get a number, but a single number can only tell you s much.  It’s useful for how many like unread messages or voicemails I have, but tells me nothing about who sent those messages or called.

Microsoft is doing this right in Windows Phone and Windows 8.  The weather apps shows me at a glance if I need my umbrella that day.  The sports app shows me who won last night.  I’d love a small block on my iPhone to show me these things.  When I’m busy let me find what I need and go.

Conduits Between Apps

Why does every developer have to write DropBox integration into their App?  Give an interface that app developers can write against and then let DropBox, SugarSync, Google Drive, and everyone else write their own handler of that interface.  If I want to use Microsoft’s SkyDrive to store my files, I don’t want to worry about if the developer chose to integrate it.  Let Microsoft write an implementation of SkyDrive and then every app instantly supports it.

This would work for so many things.  Let’s say I have a program to manage my photos on my device.  I use 500px to post my photography, so why not a search interface that let’s me search for photos there just like searching for photos on my device?  The integration options would really open up apps to the world.

Better App Organization

I really don’t need or want two folders with the same name because I have one more than the limit Apple decided I should keep in one.  There is no way that having Games 1 and Games 2 makes sense.  Let me put more things into a folder or even better let me put as much as I want into a folder.

Centralized Communication

I’ve always wanted a unified communication point.  I want all my email, text messages, even phone calls and voicemails in one place.  I want to see Facebook updates, RSS updates (yes I still use those), Google+ posts, and tweets there too.  Tie this in with the connectors mentioned above so that anybody could make their service available to the hub.

Bring my digital life to a centralized point and let me choose what I want to see at a given time.  If I’m meeting someone for dinner I may want to just look for any texts or emails from her or for a tweet about being traffic letting me know she’ll be a little late.  If I’m coming back from a week’s vacation in the mountains, I want to see everything work related from the last week, but only from co-workers.

Stop Worrying So Much if Apple Gets it Cut

I know this one has zero chance of happening, but it’s just an annoyance I’d like to see go away.  Apple seems determined to make sure nothing happens on the device where Apple doesn’t get it’s 30% cut.  Want to buy a book for the Kindle App?  Have to go to the web site as Apple’s rules would require Amazon to give Apple a 30% cut if it could be done there.

This simply makes my life less convenient and isn’t making Apple any more money.  Vendors have overwhelmingly shown that they’ll just remove the functionality to purchase in app and rely on their customers to find them somewhere else.  And it’s working.  I don’t use iBooks because it’s more convenient, I use Kindle because it’s what I want.  My audiobooks come straight from Audible.

That’s my wish list for iOS 6.  Anyone else with requests?

Adding Recovery Partition to Lion Install

As I mentioned in an earlier Mac post, I upgraded my MacBook Pro with a larger 500 GB hard drive.  I made the move by cloning my existing hard drive to the new hard drive which I’d attached by USB.  This worked perfectly – until I went to encrypt the new drive.  It turns out my clone tool didn’t copy the hidden recovery partition.

I’m a big believer that any notebook or portable computer should be encrypted.  My previous PC was encrypted using Truecrypt which worked wonderfully.  When I moved to the Mac, I was happy to see Lion added support for real encryption.  I did that soon after upgrading to Lion with no problems.

I like encryption because I consider my data the most valuable things I have.  I don’t want to lose my hardware, but I really don’t want someone else able to flip through my data.  I try to keep the really important stuff off my laptop, but you never know what might slip onto it.  I like the thought that if my notebook is lost or stolen I can simply get my data back from the last backup while the thief can’t find anything.

When I went to encrypt the new hard drive, Mac OS informed me it couldn’t because the recovery partition was missing.  Some research led me to backing up my data to an external hard drive, and then doing an install and restore.  I did this, but apparently missed a step and still no recovery partition after almost a day of backup/install/restore.

I had some other tasks to work, on so I put this one off for a while.  I finally came back to this week.  My research led me to a blog post by Dmitry Dulepov that outlined a fairly straightforward process.  You install Lion to a USB drive, repartition your hard drive to create space for the recovery partition, and then copy the recovery partition from the USB drive to the hard drive.  I had a USB thumb drive that worked fine.  When I finished all went well until I looked for the recovery partition on the USB drive and didn’t see one.  Apparently this recovery partition is harder to create that I’d thought.

More reading showed me a couple more options.  First came trying to re-run the installer.  While that might have worked, I was a little wary given my track record with the installer not creating this partition.  So I did some more research which led me to this blog post on removing and rebuilding the recovery partition that referenced this entry.  I didn’t need to remove, but I did need to rebuild.  I skipped the removal of the partition in that first entry and followed the steps to rebuild it.  It worked.  I rebooted to find the recovery partition there and was immediately able to encrypt the drive.

Six Months with a MacBook

Back in July I started using a MacBook Pro as my laptop. A month later I’d become pleased enough with it to move over to it full time. Now that it’s nearly six month into the change I thought I’d add a few thoughts on the current state.

Not all was perfect. In fact I found that, as with most basic laptops, the included hardware didn’t last too long for my needs. Memory was my first problem and 4GB just wasn’t enough.  I’m surprised how much RAM the computer uses in just normal use with a few of my normal programs (Firefox, Outlook, etc.) running. I really wanted 16GB in the laptop, but the cost of that back in September was too prohibitive. I settled on upgrading to 8GB which works well most of the time. In fact even with 8GB I sometimes see the computer bog down when running a 3GB virtual Windows computer.  Memory prices on 8GB chips have finally dropped to the range I decided to buy that to put in.  The upgrade will be here in a few days so I’ll not later how it works.  That would also open up Photoshop, Lightroom, and Premiere among other apps I still have to rely on my desktop for.

I still need to run Windows applications on the go making VMware Fusion a necessity. I migrated my old laptop to a virtual machine which worked great, except that my old system was already slow and in desperate need of a reinstall. As always a virtual machine works slower than native hardware so the resulting VM was painful to use. I did a few test installations of Windows and finally found a decent sweet spot. It turns out a 3 GB VM running 32bit Windows 7 gave me enough to run Visual Studio 2011, my plugins, web servers, and other tools pretty snappily. I actually feel comfortable  

I also found hard drive space getting tight after a few months. So right before Christmas I took advantage of a good sale (especially surprising given the recent price increases) to upgrade to a 500GB drive. I chose one of the Seagate Momentus XT drives that includes a small amount of flash memory giving you a bit of a hybrid between the high speed SSD and high capacity storage. The speed jump is noticeable after a couple weeks usage. I would have liked to look at the larger (and faster) 750GB Momentus, but couldn’t justify the cost difference.

Overall I’m quite happy with the Mac hardware.  I’m still undecided if the price difference between it and a similarly configured PC is worth the change.  I still believe Windows 7 is  as good of an operating system as Mac OS.  The hardware is well designed and the upgrade of both the hard drive and memory were easier than in many PC laptops I’ve dealt with.  I also notice the reactions when you pull out a MacBook in a coffee shop are noticeably different than with a PC and mostly in a better way.  I’ve had people start a conversation with me about the MacBook while sitting and working.

One thing I’ve been less pleased about is the software situation on the Mac, but that’s another post.

Life with MacBook

It’s been a month now since I bought the MacBook Pro and I’m about to make it my primary portable computer.  It’s not any one thing and I’m not sold on the Mac is greatest and Windows stinks.  My Windows laptop still gets almost as much use as the Mac and my Windows desktop gets more use than both.  What I’ve found though is the combination of light weight and small size make it perfect as the “put in the bag and go” computer that I need.  If anything it may reduce my use of the iPad more than other computers.

I do plan to try moving my Windows development environment, my primary use for the Windows laptop, over the MacBook running as a virtual machine.  I’m not sure if that will stick both due to the memory in the computer and due to the smaller screen size.  I’ve gotten used to this for email and editing files, but not sure how it will look editing code.  Time will tell.

I can’t deny there is an element of sexiness to the MacBook.  Taking it out of the case just looks better than my PC.  Last Friday a friend came over to work on a project together.  She ran a little late and while waiting I went through email and when she arrived left the MacBook sitting on my couch.  She noticed it and commented on it.  Now she is a long time Mac user, but I know that a new PC would not have gotten the same reaction.

So a month into the MacBook it’s winning me over.  The next couple of weeks where I try to move my PC related tasks to it will tell much.

I Own a MacBook

The iPad was a gateway drug.  Sure I found it useful and helpful, but I now see it was just the first step in Apple’s master plan.  October I got an iPad.  February I buy an iPhone.  Now I’m in the Apple world with two feet.  Five months later in mid July I am now the owner of a MacBook Pro.

I’ve been travelling a bit more than normal over the last month and I do love the iPad for mobility.  It works well if you just want to catch up on email and web while sitting in a coffee shop, but the Achilles heel of the iPad is content creation.  I did get a keyboard case that helps with this, but sometimes you need a litter bigger screen or the workhorse programs.  I’ve been thinking of getting a new laptop to travel with as my current HP workhorse laptop model is a bit bulky and getting a bit creaky.  I got the change to pick up a 13" Macbook Pro this weekend at a very good price and it seemed to fit my needs perfectly.

I’m planning to use it as my primary laptop for everything other than .NET development for a couple weeks to determine if I really will keep it or resell it.  I already see that my first software purchase will be either Parallels or VMWare Fusion to get access to my missing PC Apps.

There’s Going to be a Jailbreak

Updated this post in August 2011 with a few other jailbreak apps that I’ve installed since May

I did jailbreak my iPhone.  Hmm, maybe I shouldn’t admit that online.

In any case I’ve had a jailbroken phone for a few weeks and have found a few apps that I think improved the experience:

Action Menu Plus – Just handy that adds some extra options to the standard copy/cut/paste options

CameraLock – Puts a link to start the camera on the lock screen.  Pretty much taken from iOS 5

Five Icon Dock – Lets you keep an extra app in the dock

Five Icon Switcher – Adds extra icon to the switcher

Infinifolders – Probably my favorite app as I have way too many apps on my iPhone and this lets me organize them better

ManualCorrect Pro – Never again send an inappropriate text message to someone

MobileNotifier – Another one that probably becomes obsolete in iOS 5.  Makes notifications less of a pain

My3G – Let’s you convince the phone it’s on wireless when its not

PkgBackup – I just like knowing all the stuff on my phone is backed up.  Backed up to the cloud is even better.

QuickReply – Makes replying to text messages faster

My First Couple Months with an iPhone

A couple weeks after getting an iPhone in mid-February, I wrote up a few thoughts on the new phone.  I thought that I’d add a few thoughts now that I’ve had more time to get used to the phone and really integrate it into my life.

In short I love the iPhone more now than then.  I’ve used a smartphone since getting a Motorola MPx220 that ran Windows Mobile back around 2004.  The iPhone works better than any phone I’ve had for just about everything.  With every other smartphone I’ve owned I’ve restarted it at least every once a week.  I have probably restarted the iPhone a couple of times in four months.  Using the phone just feels natural.

I really think that apps do much to improve the experience.  Without apps, the iPhone would just be a nice phone and not as useful as it’s become.  Actually the apps are half the story and the other part would be data.  Before I just used data for email and web browsing.  Now I use data all the time for Twitter, maps, and really everything.

Most of the concerns that I mentioned in my first post still bother me.  I did figure out how to get the alerts the way that I wanted, but I still feel it could be more flexible.  Six years of having phones that managed being silent or making noise when appropriate spoiled me.  I still find myself forgetting to set the phone to vibrate or, more often, forgetting to turn sound back on after a meeting.  One feature my earlier phone had was the ability to set the phone to be silent for a set period of time when you could estimate how long you’d want quiet such as when going into a restaurant or movie and then it would turn sound back on automatically.  I’d like to see that option.

The texting interface has grown on me.  I’m using texting more now and I’m not sure if the iPhone has led to more texting or if my greater texting led to me getting more used to the iPhone interface.

I decided to Jailbreak my phone and will be looking at the Cydia store to round off some of the rough edges.  Will report on what I find then.