diskshadow.exe
I am attempting to copy some files from a windows 2008 server using diskshadow.
I am using the following script:
#DiskShadow script file
set context persistent nowriters
set metadata c:\copydata\backup.cab
set verbose on
begin backup
add volume c: alias SystemVolumeShadow
add volume d: alias DataVolumeShadow
create
expose %SystemVolumeShadow% p:
expose %DataVolumeShadow% q:
exec c:\copydata\backupscript.cmd
end backup
delete shadows exposed p:
delete shadows exposed q:
#End of script
if i use xcopy in c:\copydata\backupscript.cmd I get "access denied" errors along with "0 files copied" however the files and datestamps are copied, but not the contents of the files.
if i use robocopy in c:\copydata\backupscript.cmd I get no errors however nothing is copied.
Is there a command which will copy files from a shadow copy created with diskshadow in the same manner as xcopy could be used with shadow copies created with vshadow.exe.
Alternatively if there was a way I can select a nas drive as the target for a backup using "Windows Server Backup" as that would do instead.
Thanks in advance for your assistance
June 12th, 2012 11:52am
Thanks for your response. The robocopy syntax you suggested was essentially what I was doing. I re run the same batch file the following day and this time it performed as expected. A bit worrying that the same code produces different results on different
days, but at least it works now. So thanks again.
Free Windows Admin Tool Kit Click here and download it now
June 18th, 2012 4:21am