CompletePC Backup: Transplanting a Vista installation from one drive to another
I know I’ve covered CompletePC Backup in two previous newsletters, but I have since used it for a real-world backup and restore and in the process discovered a couple of undocumented things that might be useful. (“Undocumented” because I’ve spent a lot of time with the Server 2008 version of CompletePC Backup and noticed a few useful options to the wbadmin command that Microsoft’s documentation clearly stated only worked with 2008 and not Vista. You won’t be surprised to hear that they did work in Vista, after all.)
Quick review: CompletePC Backup is a new technology built into Vista and Server 2008 that backs up entire drive letters (or groups of drive letters), storing them in the VHD format that Microsoft normally uses to store its virtual machines for Virtual Server, Virtual PC or the upcoming Hyper-V server. The VHD format understands the notion of snapshots and so a given VHD can store many versions of a given drive’s backup, and does it fairly efficiently as the snapshots store just the differences from one backup to another. These backups can then be restored to do a complete system restore, allowing you to do a CompletePC Backup of a system and then restore that to a system with somewhat different hardware. (Different drive architectures seem not to always work — transplanting a backup taken from an IDE hard disk doesn’t seem to be possible on a SATA hard disk, for example, although I HAVE transplanted a SCSI backup onto an IDE drive.) Thus, CompletePC Backup allows for so-called “bare metal” restores. Again, it cannot just back up a single file or folder — just an entire drive.
Anyway, here’s the story. 7200 RPM laptop hard disks now come in a 200 GB size. (I’m staying with 7200 RPM because Vista is a lot happier with 7200s. Previously 160 GB was the largest 7200 RPM laptop-sized drive.) In addition to being larger, the drive (the Hitachi Travelstar 7K200) has a 16 MB cache, rather than the 8 MB cache found in the other laptop hard disks that I’ve used… so I had to have it.
I know, you’re saying, “Minasi’s going to transplant his Vista system from one drive to another for a measly 40 more gigs?” Yup; that measly 40 gigs, my friends, is equivalent to space for four more virtual machines, or a couple more virtual machines and space for a bunch more photos. (If you’ve not been to www.minasi.com/photos, then you’re missing out on the gray fox and dolphin pictures.) But how to move from the 160 to the 200 easily and cheaply? With CompletePC Backup. I’ve covered CompletePC Backup before, but now that I’ve used it to do a “no muss, no fuss, no greasy aftertaste” drive upgrade, I wanted to cover the steps in detail to (1) document some extra CompletePC syntax that I found in the process of doing the drive transplant and (2) save someone having to do this the trouble of looking all of this vaguely-documented stuff up. I have already covered much of this in Newsletters #63 and #64, but, again, when I actually bet my laptop’s drive on it, I found having step-by-steps useful, as I’d sat down beforehand and laid out a procedure — and I’m hoping you’ll find it useful also.
Backing Up the Drive
As I’ve discussed in previous newsletters, we’re going to back up the existing drives on the laptop to either an external drive (like a USB-connected drive) or a network share, using the wbadmin.exe command-line tool shipped with Vista but which is, sadly, a mite underdocumented.
First, open an elevated command prompt (one where you right-clicked the “Command Prompt” icon, chose “Run as administrator” and clicked “Continue” at the User Account Control prompt).
Then type “wbadmin start backup -backuptarget:wheretobackupto -allcritical -quiet” where wheretobackupto is either an UNC path or a drive letter. Remember from previous newsletters that you cannot specify a drive letter that is actually a mapped drive (and you may recall that the GUI is completely network-deaf for some reason) and if you specify a drive letter that is a hard drive letter, then ensure that you specify only the drive letter — you cannot include a path within that drive letter.
The “-allcritical” is an option that I discovered shortly after writing the last newsletter wherein I covered wbadmin. It appears nowhere in Vista documentation, but it appears in Server 2008 documentation with the specific warning that the “-allcritical” option only works on Server, and not Vista. (So much for documentation.)
Here are a couple of working examples:
wbadmin start backup -backuptarget:h: -allcritical -quiet
This is the simplest example, which instructs wbadmin to back up everything on the PC except drive h:, and to put the backup on h:. (CompletePC cannot back itself up to a drive that it is backing up for some reason. You’d think it’d be smart enough to be able to handle it, y’know?) The trick is the “-allcritical” switch; otherwise, we’d have to name every drive to get those drives backed up. The documentation says that “-allcritical” only backs up the drives that are essential to making the OS work, but my older laptop image had a superfluous drive D: that was 1.5 GB in size and did nothing of any value, but -allcritical backed it up, all the same. To reiterate an important point, this would not work:
wbadmin start backup -backuptarget:h:\pcbackups -allcritical -quiet
I have no idea why, but wbadmin doesn’t let you specify a full drive and path, just a drive; it then puts it in a folder on that drive called WindowsImageBackup.
(Interesting note: I’m not sure why, but when I restored the backup to the new drive, it rearranged my volumes — I had three, only two of which were important — so that the essential ones were restored first, and the superfluous one later. I don’t know if this is a behavior that’ll happen every time, as I’ve only tried it once, but it was wonderful, as it let me delete the useless volume and then use its 1.5 GB in combination with the newly-acquired 40 GB as one new volume. Very nice!)
wbadmin start backup -backuptarget:\\myserver\myshare\pcbackupsdir -allcritical -quiet
Here, we’re doing the same thing, but to a share. Notice the next wbadmin oddity — specifying an UNC path lets you specify a folder within it. What backing up to H: could do, backing up to \\myserver could. Go figure.
Expect the backup to take a fair amount of time. On my system, backing up the roughly 152 GB of data on my hard disk took about eight hours.
Restoring to the new drive
Now that my original 160 GB drive was backed up, it was time to perform some open-PC surgery and swap the drive. I opened up the PC, removed the 160 GB drive, and replaced it with the empty 200 GB drive. (Of course, the nice part about this is that if the restore fails, I could have always fallen back to the 160 GB drive.) After securing the new drive, I popped the Vista installation DVD and booted from it. When I got to the “Install Now” screen, I opted instead to click “Repair your computer.” That in turn led to a screen that offered me several options, two of which were “CompletePC Restore” and “Command Prompt.” You’ll use one or another of those two options, depending on where you put the backup.
If you backed up your old drive onto an external USB drive, then plug it in (if it’s not plugged in yet) and choose “System Restore.” Then just run the GUI — it’ll look around, find a CompletePC backup on the USB drive, and offer to restore it to your 200 GB drive. It will warn you that it’s going to blow away anything currently on the hard disk (it has to repartition the drive to match the backed-up partitions), and in a short time, much less time than the backup took, you’ll have a working system.
If, on the other hand, you backed up to a network share, then you need to do three things:
- Connect to the network
- Get the internal “version number” of the backup, even if it’s the only one
- Run a recovery from the GUI or the command line
Getting on the network is easy:
- At the dialog box/window where you didn’t choose “CompletePC Restore,” choose “Command Prompt.”
- In the command prompt, type “startnet” and press Enter.
- Check that you’ve got network connectivity with “ipconfig” and, if you don’t, then look at newsletter #59 for some tips on how to get that network connectivity going.
Next, find out the version of your backup by typing
wbadmin get versions -backuptarget:\\myserver\myshare\pcbackupsdir
(Of course, your share won’t have that exact name; substitute whatever you’ve used.) You’ll get a “version name” back that looks like “08/16/2007-14:17” and you will then plug that date into a command that looks like
wbadmin start sysrecovery –backuptarget:\\uncpath -version:versionnumber -recreatedisks -quiet
So, for example, in my case I’d type
wbadmin start sysrecovery –backuptarget:\\myserver\myshare\pcbackupsdir -version:08/16/2007-23:47 -recreatedisks -quiet
That should be typed on just one line — I broke that to make it a bit more readable. Again, the system will run for a while and you’ll have your OS on the new drive, good as new. Just remember from Newsletter #63 that the target drive must be the same size or larger than the old drive, or it won’t work. Good luck upsizing!