What is some sample code in VB.NET for copying a file via a volume
shadow copy in WinXP? Must go all the way through from setting up the
volume shadow copy, copy the file, then close the volume shadow copy
so that I can take the sample code, paste in into VS.NET, and it will
run without further code.
Must include comments, informative variable names, and be as simple
and reabible as is reasonably possible. |
Request for Question Clarification by
mathtalk-ga
on
10 Feb 2003 16:18 PST
Hi, bonds-ga:
There is a Volume Shadow Copy service under WinXP that is by default
set to start manually. The Windows backup utility NTBACKUP.EXE
invokes that service when (either through the GUI or commandline
options) it is run with the SNAP (volume shadow copy) option set.
Would it suffice for your purpose to have VB.Net code that exploits
the existing NTBACKUP functionality? Or are you seeking a program
that essentially duplicates that functionality (without dependence on
it)?
regards, mathtalk-ga
|
Clarification of Question by
bonds-ga
on
10 Feb 2003 18:03 PST
I'm looking for managed code that uses the .NET libraries and WMI to
create an instance of a shadow volume, then copy a file from it. It
should not go through NTBackup or any other application to perform the
operation. Yes, I'm looking for code that duplicates NTBackup's
ability to use shadow volumes, but the code should not go through
NTBackup to do it. The code I'm looking for would be used as part of
a backup program that could be used instead of NTBackup, so it needs
to be dependant only on the OS.
See this link for more info:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_shadowcopy.asp?frame=true
|
Request for Question Clarification by
mathtalk-ga
on
10 Feb 2003 18:31 PST
Thanks for the clarification, bonds-ga. One more question: do you
anticipate running the program locally (from the computer where the
shadowed volume exists) or remotely? I believe the remote creation
of the volume shadow copy may involve some authentication design
issues that would be more simply addressed in the local setting.
regards, mathtalk
|
Clarification of Question by
bonds-ga
on
10 Feb 2003 19:53 PST
The code will run locally. I do not need code that supports creating
a locally accessible shadow of a volume on a remote machine.
|