I am new to vss. I am able to do a volume snap, but when trying to restore, I get that vss is in an inconsistent state and the event viewer:
Volume Shadow Copy Service error: Unexpected error querying for the IVssWriterCallback interface. hr = 0x80070005, Access is denied.
. This is often caused by incorrect security settings in either the writer or requestor process.
sure i am running as admin.
here is the code:
vss = Alphaleonis.Win32.Vss.VssUtils.LoadImplementation(); // load the correct version of alphavss
bk = vss.CreateVssBackupComponents(); // Alphaleonis.Win32.Vss.IVssBackupComponents
bk.InitializeForRestore( strdoc ); // strDoc is from IVssBackupComponents::SaveAsXml
Alphaleonis.Win32.Vss.VssSnapshotProperties prop = bk.GetSnapshotProperties( a_gidSnapshotId );
bk.RevertToSnapshot( prop.SnapshotId, true );
do you have an example that is able to restore?