#vmbackups.dsh<br><br>#Make shadows persistent<br>SET CONTEXT PERSISTENT<br>SET VERBOSE ON<br><br>#Cab location for process<br>SET METADATA d:\temp\Backup.cab <br><br><br>BEGIN BACKUP <br><br>#Alias volume with alias <br>ADD VOLUME D: ALIAS DVOL<br><br>#Create Snapshot<br>CREATE <br><br>#Expose the volume and run command file then unexpose<br>EXPOSE %DVOL% X:<br>EXEC D:\Scripts\copycommands.cmd<br>UNEXPOSE X:<br><br>END BACKUP<br><br>#Delete the shadow copy<br>DELETE SHADOWS SET %VSS_SHADOW_SET% The command file copycommands.cmd can contain any commands you need for copying your desired files from the shadow copy.
Save the script as vmbackups.dsh and run it using the command
diskshadow -s vmbackups.dsh For more about Diskshadow scripts, see Microsoft’s page on the Diskshadow utility.





