Freigeben über


Long term PC archiving with Windows Home Server

The backup service built into Windows Home Server is designed for easy and efficient storage and recovery of files from multiple different PCs in the home as well as easy recovery. Because it does this job so well some have taken to using it as a longer term archiving solution so as to safeguard the last state of a PC before it was scrapped, never to be seen or booted from again.

While this is definitely an option, but it may not be an ideal one for all as there are a few areas that should be considered before relying on Windows Home Server for long term archiving within the backup database, areas including:

PC Limit – Windows Home Server is currently limited to backing up 10 PC's... even when some of those PC's are no longer actively being backed up and just are being stored for short/long term, this lowers the number of actual PC's that can be protected daily.

Legacy Support – If 5, 10 or even 20 years from now you were to attempt to read from the current backup database... how would you do so? The format of the database is at present not publicly documented and very well can change over time and so running/finding software that will be able to parse it in future may not be possible.

Retention Granularity – While it is easy to determine which files/folders/drives should be backed up... it is not so easy to specify after the fact which drives should be retained and which should not short of doing one final backup which only backs up the desired data.

<side note> Because Windows Home Server is such a consumer focused product, we are always listening to customer feedback (best given on Microsoft Connect) when it comes to what features and/or limitations exist (or do not exist) in the product (or environment) that prevent users from being able to use it best in their homes. If you have ideas, we want to hear them, especially right now on the subject of the 10 pc/user limit and alternative implementations. </side note>

Due to some of the above areas I recently found myself with a bit of a problem where my old desktop PC had 3 hard drives in it with a total space of over 800 gigabytes (about half of that being media that is now securely on my Home Server shares) had been regularly backed up to my home server for quite some time, that means that a significant chuck of my current 893 gigabyte backup database is data that is already safely elsewhere and a bit of trimming might be in order one day.

Given none of the above areas are likely to be resolved today or tomorrow other options should be considered... be it dragging just those files/drives I want to a folder somewhere, or perhaps one of the most obvious of booting up a whole new PC, doing a bare-metal restore to a HD (or set of HD's of just what you want) and then putting them on the shelf for a while.

Both of these options would certainly work... only they aren't the the best as the first doesn't allow me to retain all of the actual subtleties of the contents of the disk (boot data, user SIDs, NTFS junction points, etc) while the second is fairly inefficient when it comes to disk space.

One Solution

My solution to this problem was simple... to use Virtual PC 2007 to create a new virtual machine and virtual hard disk (VHD) of sufficient size, boot off of the Windows Home Server Recovery Disk (or disk image on the server) and restore which ever partition(s) I want to a virtual hard disk.

Best of all, as a VHD I have many different options for accessing the data in various ways as there are numerous tools out there that allow the reading/editing of them, in fact as part of the Open Specifications Promise (OSP) the Microsoft Virtual Hard Disk format is well documented allowing me to write my own later if I so wanted/needed... heck, Windows Server 2008 even comes with that support in the box!

What is needed

  1. Virtual PC 2007 (free)
  2. Virtual Server 2005 (free) or Windows Server 2008
  3. A Windows Home Server
  4. A desktop PC with plenty of ram and hard disk space

The process

  1. Install Virtual PC 2007
  2. Create a new virtual machine
    1. Create a virtual machine

    2. Specify name for virtual machine (default is fine)

    3. Specify operating system as Windows Vista (suggested as the recovery CD uses the Windows Vista version of Win PE)

    4. Use suggested amount of ram (512 MB)

    5. Create a new virtual disk

    6. Specify location for virtual disk and allocate sufficient space for restored image

      Note 1: The space specified here will not immediately be used on the system, instead virtual hard disks grow in size up until the size specified here.

      Note 2: Virtual hard disks created with Virtual PC 2007 are limited to 127 gigabytes in size, for archival backups involving larger drives/volumes it may be necessary to either use Virtual Server or Hyper-V (both of which support larger disks) or multiple VHDs

    7. Click Finish button to exist wizard

    8. If desired other 127 gigabyte disks can be created within the virtual machine and used

  3. Select new virtual machine  in Virtual PC Console and click the Start button.
  4. Immediately after the Virtual Machine starts from the CD menu, select Capture ISO Image
  5. Specify the location of the Windows Home Server recovery image (likely located \\server\software\Home PC Restore CD\restorecd.iso) and click Open button
  6. Proceed through the normal restoration process:
    1. Specify server (if necessary)
    2. Login to Windows Home Server
    3. Select PC that will be restored from
    4. Select specific backup to be restored from
    5. Use disk management tool to partition virtual hard disk as desired
    6. Proceed through normal restore process
  7. Once the restoration is complete, allow the virtual machine to reboot and then turn off the virtual machine prior to it attempting to boot from the virtual hard disk for the first time.

At the end of this process you'll end up with a VHD which contains the same files and disk layout that is stored in your backup database, enabling you archive this image to a duplicated share on your home server, burn to DVD, store on an external hard drive or otherwise put in a safe place.

Now that we've got this giant file what can we do with it? Mount it!

Mounting

Ordinarily VHD files are only used with Virtual Machine software (Virtual PC, Virtual Server, Hyper-V, etc) but along with Virtual Server 2005 came an immensely useful tool called vhdmount which allows you to mount a VHD file as a local (potentially) read-only hard drive not unlike how Windows Home Server presents backups when doing a single file restore.

To install vhdmount:

  1. Download Virtual Server 2005
  2. Run the installer
  3. Disable all features other than VHD Mount
  4. Proceed though install

Once installed it's a simple matter of launching a command prompt (with Admin permissions under Vista or 2008), navigating to the location you installed Virtual Server (ex: C:\Program Files\Microsoft Virtual Server\) and proceed to the vhdmount directory and execute vhdmount.exe

vhdmount /m <path to vhd file>

Once mounted you should see a new disk in My Computer that you can read files from at will.

Once done with the disk unmounting it is just as simple:

vhdmount /u /d <path to vhd file>

It is important to make sure that during the unmount the /d flag is used as it causes any changes made to the VHD during the last mount to be discarded.

Other mounting options

With a couple of registry tweaks (used at your own risk) you can eliminate the need for working with the command line and simply be able to right click on VHD files to mount/unmount them at will.

It's also worth noting that Windows Server 2008 has support similar to vhdmount built in, enabling you to mount a VHD with Hyper-V.

Drawbacks

As good as even this option is... there are a few drawbacks that need to be considered:

Size - While the Windows Home Server backup service does a great job with only storing a single instance of individual file clusters between multiple backup sets and PCs... no such benefit is had with a VHD where the actual file size is roughly the same as all of its contents and multiple archive VHDs from either the same or different PCs will be quite large as there is mechanism (using the above procedure) to have one VHD only contain what another doesn't.

PC restoring - While both a PC backup as it sits in the Windows Home Server backup database or a VHD file can be dumped to a physical hard disk... the process of doing so with a VHD is far more complicated and no where near as easy as it is with Windows Home Server.

Reducing size

Just after you restore your first hard drive with this method you'll notice something... VHD files are big... really big. It's not that the format is wasteful, it's that they contain a whole heck of a lot of stuff! Various tools exist to try to reduce the overall size but even they can only reduce the size so far.

One not so quick but easy way to reduce the size even further is to take your favorite file compression application and use it to create a new archive containing the VHD... a task that can see huge size savings.

Example:

For my own little archiving project I took an 80 gig physical hard drive that was backed up to my server and restored it to a VHD which grew to 53.4 GB and after asking Virtual PC 2007 to try to shrink the disk... the size went down to 53.2 GB. Still thinking we could reduce the size a bit more I used the built in Windows Compressed (Zipped) Folder support to create a new zip file containing the VHD (ie right click, Send to -> Compressed (Zipped) Folder) and when it was all said and done 7.85 GB, ~14.7% of the original VHD size.

To some a zip file may not be the the most ideal container for a VHD as it does take a little while to compress/decompress such a large file for use, one must make the decision for themselves on the tradeoff of speed/disk size. How quickly do they really need to be able to read something from what is intended to be an archive?

Wrapping things up

Windows Home Server works great for routinely backing up home PCs and securing their contents, for longer term archiving the system is less than ideal for archiving as the entire back-end is a closed and not a publicly documented system. While backing up ones backup database from time to time can be done, pulling out just the drives we want to a more portable and open format using the existing built-in mechanisms provides for a lot more flexibility and security when archiving is the goal.