To do a backup of the virtual machines installed on your Hyper-V Server (2008 or 2008 R2 editions) you need to complete the following steps.
- Install the backup feature by typing start /w ocsetup WindowsServerBackup from the command prompt.
- Get a list of the drives on which Hyper-V Server has stored virtual machines. This will be C: unless you have made changes.
- Determine the times you want to run the backup at.
- Determine the drive letter of the removable disk by typing at the command prompt each of the following commands
- diskpart
- list volume
- The disk drive letter will be displayed for the disk that matches the size of your removable disk.
- Type exit to exit diskpart.
- From the command prompt type wbadmin enable backup -addtarget:x: -schedule:hh:mm,h2:m2 -include:y:,z: -systemState -allCritical to backup to drive X: the contents of drives Y: and Z:, the system state and all drives critical to the running of the server.
- Confirm you want to schedule the backup at times HH:MM and H2:M2 (for twice a day). If you want one backup a day use HH:MM and if you want more than two just comma separate a group of times. Enter times as per local timezone. Check the current time on the Hyper-V Server by typing time from the command prompt.
- Start a backup now if you want by typing wbadmin start backup and confirming to use the same settings as the scheduled backup.
- Backup will proceed in the console. If you log out backup will remain running.
- Enter wbadmin enable backup to see the settings you have enabled.
- Type wbadmin get versions to see what backups have completed.