Devhammer's Den


Apr 3, 2014

Always Backup. Always

Last night I learned (or I should say re-learned) a hard lesson. Several lessons, actually. More on that in a moment.

What Not to Do

I built a VM using Hyper-V to have an isolated environment for client work. Stored the VM and its .vhdx file on an external drive. So far, so good.

But for performance, I figured it'd make sense to set the VM up for boot to VHD. Did I mention the VM was installed on an external disk?

Attached the VHD, made sure to copy over the boot files, and used msconfig to add it to the boot order. msconfig warned me that I might need to enter my recovery key on the next boot, but I figured "no problem, I'll just pull up http://onedrive.live.com/recoverykey and have it ready to go."

Well, it turns out that if you've deleted your recovery partitions to save space (which I have), you may not have the opportunity to enter a recovery key during the boot process. And the bootloader apparently couldn't see my external drive (I'm guessing because it had not yet been properly initialized at that point in the boot process), so I couldn't boot from the VHD. And when I tried to boot to my base OS, I got a message that said there were "no recovery options" on my PC, presumably because I'd deleted the recovery partitions earlier.

I was able to get my recovery USB drive (yes, I had one) to boot, but startup repair wasn't able to fix the problem, nor did using a restore point from earlier in the day.YUNoBackup

In short, I made rather a mess of my machine, and today I'm slowly reinstalling applications after using "Refresh my PC" to get back to a state where I can at least boot the machine.

Lessons learned:

  1. Any time you're making significant changes to your machine, create a full image backup FIRST. If I'd had that, restoring to a good state would have been easy.
  2. If you decide to remove recovery partitions to save space, be aware that some recovery scenarios may not work, particularly if you don't use the recommended process. For a variety of reasons, I wasn't able to use the recommended means of copying the recovery partition(s) to USB before deleting them, so while I had a recovery drive, it may not have had all the necessary stuff to properly recover.
  3. Did I mention back up before significant changes?
  4. Don't try to multi-task. Humans can't do it. What many people call multi-tasking is actually switch tasking, and it's inefficient at best. If you're doing something that requires your full attention (and anything that can trash your machine counts), give it your full attention.
  5. While Windows 8/8.1's recovery options are quite robust, it's still possible to put your machine in a state that the recovery tools can't handle. Plan for that. Back your PC up. Frequently. Where possible, I like to use the built-in System Image Backup. Alas, that's pretty hidden in Windows 8.1, but you can find it tucked away in the corner of the File History dialog in the Control Panel, as shown below:SystemImageBackup
  6. It's all to easy to be complacent when dealing with computer environments. Don't be. If your livelihood depends on it, back it up regularly, and have a recovery plan if something fails.
  7. Recovery, even when things aren't perfect, is easier than ever, thanks to the cloud. Because most of my data is in the cloud, connecting back to the relevant cloud service is sufficient to get my data where and when I need it. Reinstalling applications is a pain, but ultimately more manageable than recovering lost local data.

Conclusion

If I haven't been clear enough already, the moral of this story is simple. Backup. Whether you use System Image Backup, or a third party utility that does something similar, whenever you get a machine to the point that it's configured the way you like it, do a full image backup, so that you can easily get back to the point in a pinch. I used to run a Windows Home Server that automatically backup up every PC in the house, and I used those backups on a couple of occasions to restore a machine with issues. But unfortunately, WHS doesn't seem to have a future, and so once my WHS machine died (power supply, I think), I didn't bother to build a new one. Rethinking that…perhaps time to look at Windows Server 2012 Essentials.

But however you may choose to go about it, backup frequently, and don't be complacent about making significant changes to your PC(s). Unless you'd like to learn the hard way, too.

Your Turn

Got some tips or best practices on backup and recovery? Let me know in the comments!

Tags: Tips and Tricks

Comments powered by Disqus

Visitors

Disclaimer

The views expressed on this weblog are mine and do not necessarily reflect the views of my employer.
All postings are provided "AS IS" with no warranties, and confer no rights.

Unless otherwise noted, all code provided in this blog is copyright © G. Andrew Duthie, and licensed under the Microsoft Limited Public License (Ms-LPL). All rights reserved.



worldmaps