Translator
      English flagItalian flagKorean flagChinese (Simplified) flagChinese (Traditional) flagPortuguese flagGerman flagFrench flag
      Spanish flagJapanese flagArabic flagRussian flagGreek flagDutch flagBulgarian flagCzech flag
      Croatian flagDanish flagFinnish flagHindi flagPolish flagRomanian flagSwedish flagNorwegian flag
      Catalan flagFilipino flagHebrew flagIndonesian flagLatvian flagLithuanian flagSerbian flagSlovak flag
      Slovenian flagUkrainian flagVietnamese flagAlbanian flagEstonian flagGalician flagMaltese flagThai flag
      Turkish flagHungarian flagBelarus flagIrish flagIcelandic flagMacedonian flagMalay flagPersian flag
    Tag Cloud
    Sponsors
    Recent Comments
      Archives
      Link with us

      IT Solutions Knowledge Base

      Visitors

      Today Visitors: 288
      Currently Online: 10

      256-bit Secured



Windows Server 2008 Hyper-V Backup
Home » Backup, Hyper-V, Windows Server 2008 » Windows Server 2008 Hyper-V Backup
By Glafkos Charalambous | 4 CommentsLeave a Comment
Last updated: Wednesday, November 5, 2008

I did a lot of research before providing this solution to public and I think that the combination of the script I wrote with some registry modifications and the limitation of Windows Backup Schedule to store the backup to a remote network share or external drive with automatic date creation to store the backups, inspired me to share a solution around this.

First of all make sure that you applied the registry modification to support Hyper-V VSS Writer. Instructions on how to do so you can find in this post:

2008/11/windows-server-backup-hyper-v-support/

Create a batch file with the following code:

@echo off

:: set variables

set remote=\\remoteip\remotefolder
set folder=%date:~7,2%-%date:~4,2%-%date:~10,4%
set localC=C:
set localD=D:

:: do not modify below

echo Backup Started..

mkdir “%remote%\%folder%”
wbadmin start backup -backupTarget:”%remote%\%folder%” -include:%localC%,%localD% -quiet

echo Backup Complete Succesfully
@pause

In the variables area we define: set folder=%date:~7,2%-%date:~4,2%-%date:~10,4%” which a dated folder directory will be created on the remote location in the format of d-m-Y (ex: 05-11-2008).

Then we execute the wbadmin command with -backupTarget: option to select our destination backup folder. That could be a second local drive, an external usb drive or a network share.

After that we are using the -include: option to select the local drives or paths that we want to backup, which in our case is two volumes called C: and D:. You are not limited to backup the whole volumes but you could easily decide to backup only specific folders from each volume but you will have to define them in the script above.

I had tested a full backup and restoration of Hyper-V images and they are booting succesfully.

To create a scheduled backup

1) Create a new folder on C: drive named BackupSchedule
2) Place the backup script to BackupSchedule Folder
3) Create a backup account that will run the schedule (ex: backup)
4) Create a Schedule Task to run on daily basis the time and hour you wish to backup your server. Remember while you create your task to assign the backup account and select Run whether user is logged on or not option. Also be sure to have the same account details on the remote network location to avoid asking for a password.

Sample Output of the batch script running:

VN:F [1.9.3_1094]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
  • Digg
  • Facebook
  • Technorati
  • del.icio.us
  • StumbleUpon
  • Sphinn
  • Reddit
  • Google Bookmarks
  • Wikio IT
  • Slashdot
  • co.mments
  • Fark
  • Fleck
  • LinkedIn
  • Ma.gnolia
  • MySpace
  • Propeller
  • Print
  • email

Comments

4 comments
  1. Richie
    March 30, 2009

    Why the “Full Windows Backup” all the time and not the changes backup or some similar???

    [Reply]

    Alcor Reply:

    Because the incremental backup did not work on share folder or mapped drive, only on local drive.

    [Reply]

    VA:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 0 votes)

    Alcor Reply:

    Because incremental backup work only on local disks (on same machine or SAN)

    [Reply]

    VA:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
    Leave a reply
  2. Richie
    February 4, 2010

    Thanks for the answer.

    [Reply]

    VA:F [1.9.3_1094]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.3_1094]
    Rating: 0 (from 0 votes)
    Leave a reply

Leave a Comment

Add your picture!
Join Gravatar and upload your avatar. C'mon, it's free!