Quick Full-Disk Backups with Disk2VHD

Microsoft Sysinternals have free utility available to make full VHD backups from your hard drive. Using a VHD backup you can mount it in Windows and also import it into virtualisation software such as VirtualBox or VMWare and Hyper-V.

You can download the software from here:http://technet.microsoft.com/en-gb/sysinternals/ee656415.aspx

Below is a simple batch script to create automated backups using the command line; which can be set on a schedule.

Save the following as VHD.bat. Edit the backup_path variable with the location to store the backup. By default DISK2VHD will select all drives on the machine.

@ECHO OFF
ECHO Starting DISK2VHD Backup
SET starttime=%time%
SET backup_path=\\share\backups\
ECHO Backup started at: %starttime% > log.txt
IF NOT EXIST %backup_path%\%computername% MKDIR %backup_path%\%computername%
disk2vhd.exe * %backup_path%\%computername%\%computername%.vhd -accepteula
SET endtime=%time%
ECHO.
ECHO Backup completed at: %endtime% > log.txt
PAUSE

Steve

Web Developer, IT enthusiast & PC Gamer.

Leave a Reply

Your email address will not be published. Required fields are marked *