I am implementing a backup of Hyper V VMs using diskshadow based on Windows VSS (Volume Shadow Copy Service).
The implementation is pretty much as described in DiskShadow / Xcopy BACKUP of Hyper-V, where the diskshadow script is like the following:
set context persistent
set metadata C:\backup.cab
set verbose on
begin backup
add volume C: alias ConfigVolume
#The GUID of the Hyper-V Writer
writer verify {66841cd4-6ded-4f4b-8f17-fd23f8ddc3de}
create
EXPOSE %ConfigVolume% Y:
EXEC HyperVBackup.cmd
UNEXPOSE Y:
end backup
In HyperVBackup.cmd the actual copying of the shadow copies to a backup drive is done using xcopy. This is oviously the most time consuming part of the backup process.
The begin backup
and end backup
commands send events to vss writers to allow them to prepare for shadow copy creation and to react on the end of the backup.
- Is it a good idea to call
end backup
AFTEREXEC HyperVBackup.cmd
? Wouldn't this force vss writers to stay in an intermediate state as long as the long xcopy part takes? - Wouldn't it be appropiate to call
end backup
BEFORE the lineEXEC HyperVBackup.cmd
?
Actually I do not know what vss writers typically do when they receive the event sent by end backup
.
Thanks, nang.