Wanted: Network Administrators

See great job listings on the jobs Page

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

Need to support users over the internet? click here try our remote control online beta






June 12th, 2012 8:52am
Hi,

I would suggest trying the following syntax:
robocopy X:\shadowcopy\dir\dir Y:\dir /S /XJ /COPY:DAT /NFL /NDL /w:0 /r:0
The header information:

I am copying only the dir/dir directories (change as required)X being the source driveY being the destination drive*.* indicates to copy all files/NDL suppresses directory listings to the console/NFL suppresses file listings to the console/S copies the source folder and all sub folders and files/COPY:DAT copies data, attributes and timestamps/XJ exclude junction points/R:0 number of retries on failed copies (in other words -do not re try - Edit to taste)/W:0 wait between retries
Kind Regards,
Martin
Credit: Richard DIf you find my information useful, please rate it. :-)

There is an amazing pack of free network admin tools. click here to download it






June 12th, 2012 10:26am
Hi,

I would suggest trying the following syntax:
robocopy X:\shadowcopy\dir\dir Y:\dir /S /XJ /COPY:DAT /NFL /NDL /w:0 /r:0
The header information:

I am copying only the dir/dir directories (change as required)X being the source driveY being the destination drive*.* indicates to copy all files/NDL suppresses directory listings to the console/NFL suppresses file listings to the console/S copies the source folder and all sub folders and files/COPY:DAT copies data, attributes and timestamps/XJ exclude junction points/R:0 number of retries on failed copies (in other words -do not re try - Edit to taste)/W:0 wait between retries
Kind Regards,
Martin
Credit: Richard DIf you find my information useful, please rate it. :-)

Need to support users over the internet? click here try our remote control online beta






June 12th, 2012 10:26am
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.

There is an amazing pack of free network admin tools. click here to download it






June 18th, 2012 1:22am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics