Sei sulla pagina 1di 4

WINDOWS

BACKUP,
DATA,
WINDOWS MAINTENANCE
Virtual hard drives: The IT pro trick that lets
you back up your data for free
Jon L. Jacobi
Aug 19, 2014 3:30 AM
e-mail
print
Jon L. Jacobi Freelance Writer, PCWorld
Once you finally start backing up your data (like youve been told to over, and over again), consider using a virtual hard
drive (VHD). VHDs have been used by IT professionals for years in virtual machines and server applications, but
you can also use them as a free, easy-to-use backup formatespecially since the tools required to use it come with
Windows
A VHD is a large container file that simulates the file structure of a hard drive. Think of it as a fancy ZIP file, but
without the compression. Because VHDs are single files, they make handling and replicating your backups a cinch.
They also allow for easy restores (more on that in a bit), and cross-application/platform compatibility. A VHD file sits
on the hard drive like any other file, however, so be sure you have enough space to accommodate it.
Many programs recognize the VHD format, including Oracles VirtualBox virtual machine software, which is available
for Windows, OS X and Linux. VHD files can also be accessed via local networks, the Internet, the SMB protocol, or
removable media. Once attached to the system, VHDs can be treated just like external hard drives or USB sticks.
How to use a VHD
After youve created and attached a VHD file, you can back up to it using any means you see fit: a favorite backup
program, or a simple copy and paste. I recommend the latter, or a plain-file (no compression) backup utility.
One of the chief advantages of a VHD file is that you can easily browse and restore files using nothing more than
the operating system. Just attach it and browse for what you need.
Creating a VHD file

Windows defaults to fixed-size VHDs. These are faster and less prone to damage from power outages, but they can
hog space on your real disks. While the size in this dialog says GB (gigabyte), Windows defaults to MB, or
megabytes.
To create a VHD file, open Device Manager or press Windows key + S (in Windows 7, click Start), and type
diskmgmt.msc to access Windows disk management features.
Open the Action menu and select Create VHD. Youll be presented with a dialog to name the VHD file, choose its
location, define its size, and choose its format.
A VHD file can be of fixed size, or it can start small and expand as necessary (dynamically expanding). A fixed size
is slightly faster and slightly more robust in power-off situations. The dynamically expanding option can be better if
you need to save space.
Because storage space for backups fills rapidly, I generally choose to use dynamically expanding VHDs.
Note that the default size is defined in megabytes. Unless youre backing up nothing but text files, you might want to
change the units to gigabytes or terabytes.
A VHD file can be up to 2.2TB. If you plan on using Virtual PC 2007, remember that Virtual PC can only use VHD
files up to 127GB.
For easy management, name the file something meaningful. Dont use the same simple name as the partition
youre backing up--that could get confusing. I use a combination of the name of the drive or partition Im backing up,
plus backup, plus the date. For example, Music backup 08 15 2014. The date makes it easier to find a specific
backup if you create multiple backups of the same drive/partition.
Once youve created the VHD, itll be automatically attached to the system.
Right-click the VHD, which should say something like DISK 2, and select Initialize disk. Choose MBR (Master Boot
Record) or GPT (GUID Partition Table) and let it initialize. Unless youve got a specific use in mind, GPT and MBR
should work equally well.

Right-click on the device name to initialize the VHD.
Right-click over the area to the right that says unallocated, select New Simple Volume, then follow the wizard to
create and format a partition.

Once youve initialized your VHD, youll have to create and format a partition.
I recommend naming the partition something meaningful. I use the same format as I described above: name +
backup + date. Shorten or drop the date if it's too long.
Check Windows Explorer and youll see the volume you created. You can treat it just like any other disk drive.
Attaching a VHD

If youre attaching a VHD to restore files, set it to read-only to eliminate the possibility of accidental deletions.
To attach or mount an existing VHD, open Device Manager and select Disk Management, or type diskmgmt.msc.
Open the Action menu and select Attach VHD. Browse to the VHD file you want to attach and select it. If youre
restoring from a backup, check Read-only to prevent accidental erasures.
The drive should grab a drive letter on its own, generally the one you assigned originally. If it doesnt, right-click over
the partition in Drive Manager and select Change drive letter and paths.
Detaching a VHD file

Make sure you dont accidentally erase your .VHD when you detach it.
Once youre through using the VHD, detach it from the system to save memory and to prevent possible accidents.
Open Device Manager to get to Disk Management. Right-click the header of the drive and select Detach VHD.
Note that the option Delete the virtual hard disk file after removing the disk, is deselected by default. The option is
in the same location as the Read-only option when you attach a VHD, so choose your options carefully.
When you can use VHD for recovery
Using VHD for backups works best when restoring to the same hard drive, a larger hard drive, or the same model
hard drive. In any of these cases, Windows System Restore will work like a charm.
If youre trying to restore to a smaller drive, as often is the case when users go from hard drives to SSDs, there are
risks: The Windows restore routine cant adjust for the location of some files, which may be placed beyond the limits
of the new drive.
For disaster recovery, youre better off with a program such as Acronis True Image that supports restoring to different
hardware.
If you choose VHD as your backup format, just keep in mind what the format is good for and what it isnt, and youll
have a great backup solution thats easy to use and nearly effortless to move around.

Potrebbero piacerti anche