Thursday, August 5, 2010

Easily backup your Media PC (part 1 of 2)

After you have spent some time getting your Media PC setup to do everything you want, it is definitely a good idea to make a backup.   If something were to happen to your Media PC's hard disk or you had some other foul up, it would be nice to know how to quickly recover it.

Backing up a Media PC has a couple of extra challenges, but with a little preparation this is an easy task.  Even better, you don't need to buy any software as long as you are using Windows 7.  Even if you are on some other platform, you might find some of these tips useful (or hopefully interesting).

My main goals in setting up a system for backing up my computers are as follows:
  • Simple, reliable and fast
  • Same process for multiple systems
  • Low cost
Media PCs have the additional challenge that you really have two different types of data you want backed up.  The first is the PC configuration itself.  This is relatively small (measured in GBs), but important as it represents significant time and effort on your part.

The second type of data you want backed up is all of your media (this could be your TV recordings, Movies, CDs, Photos, etc).   Unlike the first, the space required could be quite large (1 TB or more!)  I treat these two problems quite differently and recommend different tools.

This first article will cover backing up and recovering the PC itself.  The second part is here.

Which backup software to use?

There are many, many tools available to backup your PC.   Some of the recommended ones that I tried include:
I gave up on Macrium early on because the free version didn't allow me to exclude files from the system image (e.g. all of my TV recordings).

Paragon had the exclusion feature I wanted, but it gave me an obscure error (0x10023 - could not create / write).   I spent a while trying to find a solution before moving on.

I tried Acronis and people seem to love it.  It also has the ability to exclude files.  However, since I succeeded in getting Microsoft's tools to work I put Acronis aside.   I would recommend considering it if you have more complex backup needs.  It is not free, however.

Microsoft's tools have some nice advantages:
  • Built-in to Windows (free)
  • No need for recovery media (your install DVD works)
  • Simple (but not a lot of options for power users)
Here is a FAQ on Windows 7 backup.

The only hurdle for a Media PC using Microsoft backup is to figure out a way to exclude your Media from the system image.   Turns out the easiest way to do that is to move your media to another partition (which is what I did).

First, get yourself a large, external hard disk.

This is a no-brainer, as an external hard disk makes for a very good backup device.  However, I would encourage people to pay attention to the interfaces on the disk.

If you can, I recommend getting one with either eSata or USB 3.0 (it should also have/support regular USB 2.0).  If and when your computer has eSata or USB 3.0 you will be able to copy data at 3 to 5 times the speed of regular USB 2.0.   I wouldn't bother with regular firewire as it is roughly the same speed as USB 2.0 and not as convenient.

Here are examples of new USB 3.0 (includes PCIe adapter) and eSata external drives

I find that a single portable external disk can serve as a backup for several of my household's computers.  This is very cheap insurance indeed!

Before you install your Media PC: partition your hard disk

I recommend creating a relatively small partition for your operating system install (Windows 7).  The reason for this is that it makes it easy to cleanly separate your OS files from your Media.   This makes backups (and later OS upgrades) much simpler.

On a relatively large hard disk, I would allocate only about 100GB for your C partition.  After you install the OS, you can create a second partition (D) from the remaining space on your first disk.

When you format this partition, you can optionally set the default block size to 64K during the NTFS format.   Since you will be storing mainly large files on your D drive, it makes sense to let the OS use large blocks.  This should make things faster and more efficient.

If you have already installed your Media PC:  Re-partition your hard disk.

Oops, what if you (like me) didn't bother with creating a small OS partition.  I had used my entire 1.5 TB drive as a single partition.  Don't worry, you can fix this.  There are several solutions:
  1. Backup your computer, repartition the disk, restore to a smaller C partition
  2. Shrink your C drive (numerous tools will do this)
  3. Or skip this and use a more powerful backup tool (such as Acronis/Paragon) that has filters for excluding Media files from your system images.
I won't go into detail on these options in this article.  However, I actually did #2 using PerfectDisk's defragment tool (use optimize for space), then used the Gparted utility on an Ubuntu Live CD to shrink.   I reduced my 1.5TB C partition to 100GB and created a large D drive from the free space.  Note:  Windows also has the capability to defragment and shrink, but they don't always work (and didn't for me).

Dealing with Media on a separate drive/partition

Once you have a separate partition for your Media, you need to tell Windows Media Center about it.

In Windows Media Center, go into the following Menu:
  • Tasks->Settings->TV->Recorder->Recorder Storage
Then select your Media partition, in my case D.  This tells Media Center to record to drive D.

If you have libraries of Movies, Recorded TV, or Pictures, you can tell Media Center about them by specifying their folders in the following Menus:
  • Tasks->Settings->Media Libraries
IMPORTANT NOTE:  If you have references in Windows Media Center (as above) to any drive other than C, Windows backup will include that drive in the System Image.  This is really annoying, but quite understandable.  Windows probably wants to backup any data needed for all programs on your system (WMC included).   Since this defeats the purpose of having your media on a separate partition, you need to undo these settings prior to making a backup system image.

If you don't do this, your backup system image could be HUGE.  My Media PC system image is a very reasonable 10GB, but if it included my recorded Media it would be 100s of GBs!

So, prior to using Windows backup, undo any references to D in Windows Media Center.  After the backup is done, add D back.   It is a pain, but it works.

Cleanup - before you backup

One of the steps that I like to do regularly is do a quick cleanup.  My favorite tool that I use is called Ccleaner.  It removes all kinds of junk from Windows temp folders from your computer.  This is really nice to run prior to any backup.   Be sure to exit from any browsers prior to running Ccleaner so that it can purge those files too.

I also periodically go through the list of installed software and remove anything that I don't think I need anymore.  I tend to install and play with lots of software so it is not uncommon for me to find a few programs that I can remove.  This speeds up my computer, frees up space and makes the backups smaller.

Now let's get started!

Windows 7 will remind you to backup your computer.  After a fresh install, configuring anti-virus software and backup are just a couple of things that Windows will bug you about.  Just check on the Action Center on the task bar:

To get started, you can click on the backup issue (if it is outstanding), or simply launch backup from your control panel:

Before starting the backup, make sure that Windows Media Center doesn't have any reference to your Media drive (in my case, drive D).  See my note above about this.

Next, setup your backup settings, click on Change Settings as shown below:

You should have your external disk plugged in and visible, then select it as your backup target

When it asks what you want to backup, select Let me choose:

I recommend making a backup using a system image.   A system image will allow you to recover your whole C drive (including the Windows directory, all drivers, etc).

Note: when you select a system image, the window below gives you the impression that you can de-select certain folders on your C drive.   While you can uncheck these folders, I have found that this has no effect.  Windows will save your entire C drive no matter what you do.   This is a bug on Window's part as I think the C drive should checked and grey-ed out once you select a system image (unless they add the ability to exclude folders in the future).  Perhaps this will be fixed in the future!

(Alternatively) when you aren't doing a system image you have the option to only backup files (excluding Windows stuff).   This is different from a backup up of your entire system, but is useful too:

You can review your choices to make sure you got it right.  You can change your backup schedule (in my case below, I opted for a manual on-demand backup only).   Note the comment about a system repair disk.  Your DVD Windows OS install disk is a repair disk, so you may not need to create one.

Finally, just click on Backup and it will do the rest

NOTE:  Once the backup is complete, don't forget to restore your Windows Media Center references to your Media disk (e.g. drive D).

Restoring a system image

Okay, let's say the worst thing imaginable happens and your hard disk crashes!  How hard is it to recover.  Turns out this is really simple.

Boot off of your Windows DVD and select Repair

Then select "recover from a system image".  At this point your backup external drive should be plugged in so that it can see it.

In the next steps, you will select which image you want to restore.

Note:  Be careful not to accept the default image since Windows will pick the newest which may not be from the correct computer (if you backup several computers to the same external disk as I do).

Also, if you have multiple images from the same computer, you can select the newest or an older one

Finally, you are given the option to repartition and format the disk prior to restoring the image.  I haven't tried this, but by partition the disk in advance (with another tool), you could change the size of the C drive (e.g. shrink it).   This would allow you to make room for a D drive on which to store your Media.

If you aren't trying to do this (or preserve any data on the disk), I would opt to format and partition the disk just so that you know you have a clean restore.

When you launch the restore image task, it actually runs pretty fast.  I didn't time it, but I'd say it restored a 10G system image in about 10 minutes (quite reasonable considering it was coming off of a USB external disk).

When it is done, you can reboot and you should have an cleanly restored copy of your previous system!

What about restoring (some) files only?

Restoring files from a backup is even simpler.  Just go to the backup in the control panel and click on "Restore my files".   Of course you will need to attach your external backup disk first.

Next, you use the tools to Browse for files/folders that you want to restore.

Note that you can't restore Windows itself (or drivers) this way.  That is what the system image is for (above).

Update:  Failure to create system image (SOLVED)

On one of my systems, I had a problem creating a backup.  If I checked "create system image", the backup would always fail (with error code 0x81000033).  A backup without a system image worked just fine.  I eventually traced the problem down to a lack of space in the hidden "System Reserved" partition created by Windows 7.  This partition is only 100MB and if it doesn't have at least 50MB free, creating a system image will fail.  I tried numerous solutions to try to free up space (apparently there are multiple causes), but none worked for me.

The solution that worked finally was to grow this reserved partition by creating another larger one.  I did this by shrinking my C partition, creating a new 450MB primary partition, coping the boot files, and marking it as active.  The cleanest description of this problem (and solutions) can be found here.  I have no idea why the System Reserved partition is full on that one system and not any others.   Obviously, Microsoft needs a better solution!


For the most part, I was actually quite surprised and pleased how well Windows backup and restore worked.  I was able to create system images of 6 different systems including my Media PC.  Other than the annoying issue of excluding files from the system image, I only had one other problem (see above).  All in all Windows backup (and restore) is really nice and does everything that I need.  There are alternative backup solutions, but it is great to know that the one provided by Microsoft does work!

As I mentioned at the beginning of this article, I like to use a different method for backing up my actual media files themselves.  This is a far simpler problem than backing up / restoring a PC.  I'll share with you how I do this in a companion post coming soon.

No comments:

Post a Comment

Copyright (c) 2010 All Rights Reserved.