Alpha VSS Restores?

Apr 16, 2012 at 6:48 PM

Hi all,

It is all backup everywhere, no one seems to say something about restores? Can AlphaVSS do restores?

From the code I came to know that the APIs like SetSelectedForRestore etc... are If 0'd, So the code block wont surpass the compiler for sure, why is it so?

But the Alpha Shadow tool does have a section for restores, but not doing any correct file moves, just restore preparations! If I do a file move [I do have the backd up copy and I know where the destination to restore to, it is an SQL, MDF/LDF] after that, will it correctly restores the file even if it is being locked up by the service?

Could any one shed some light on these? decaf, what you say??

Coordinator
Apr 20, 2012 at 5:39 PM
Edited Apr 20, 2012 at 5:57 PM

Hi,

As usual when I reply I will just point to MSDN, since they explain things better than I ever could. So take a look at http://msdn.microsoft.com/en-us/library/windows/desktop/aa384590%28v=vs.85%29.aspx for more information about how a restore is supposed to work.

AlphaShadow does not provide any functionality for actually performing a restore operation complete with file copying etc. It just illustrates the steps taken in a restore operation, excluding the file copying. This sample is modeled very closely after the VShadow sample application provided with the Windows SDK, so it does not do anything that application does, nor does it do everything that application does.

For some information see the following link: http://social.msdn.microsoft.com/forums/en-US/windowssdk/thread/14d970ab-f5c6-4964-9ce5-8cdc27969139.

Hope this helps somewhat.

Apr 21, 2012 at 6:15 AM

Hi decaf,

Thank you very much for links.

But still I was wondering why those code blocks are If 0'd?

I think if we can use,

void VssComponent::AddDirectedTarget(VssDirectedTargetInfo ^directedTarget);

void VssComponent::AddDirectedTarget(String ^ sourcePath, String^ sourceFileName, String^ sourceRangeList, String^ destinationPath, String^ destinationFileName, String^ destinationRangeList);

we can do restores? I tried to get those functions off the 'If 0' block, but stuck at what all interfaces I need to modify to get these methods exposed.

vshadow doesn't use these API's, but the one that makes use of "betest" is not compilable in Windows 7/2k8

Any help?

Coordinator
Apr 21, 2012 at 7:00 AM

Oh.. geez... I completely missed that TODO... I have no idea why there is an #if 0 around those methods (as my TODO indicates), but I didn't realize. I will look into that and fix this as soon as possible. Thanks a bunch for pointing it out, and sorry for not realizing this earlier.

Coordinator
Apr 21, 2012 at 7:17 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Apr 21, 2012 at 7:52 AM

Okay, so I finally figured out why several years ago I placed that #if 0 there and commented out some other code. It is actually intentional, and the reason is that only writers may call these methods (according to the MSDN documentation). And AlphaVSS does not support implementation of writers at this point.

Are you saying that a requester can and needs to call these methods as well for some reason?

Apr 23, 2012 at 6:12 PM
Edited Apr 23, 2012 at 8:10 PM

Thanks man, i was in a false impression that those API's are for restores, and your comment made it all clear. The API's for restores are completely different.

Though we can try doing copy files to from source destination provided the backup meta document, I was wondering how do I do this correctly?

I didn't find any way to use my component meta document created (cobbled a couple lines inside alphashadow to create the meta documents) for effective restores.

Also, I'm still not clear as to what all I've to do restore, when ever I look deep inside I see more and more API's that needed for restores. Hope some one around here can come up with a sample that effectively use AlphaVSS APIs to restore a locked file ( like a live SQL DB using SqlServerWriter or a locked system file in system32 using systemwriter)?

What about this decaf a simple filebackup/restore sample inside vshadow??

Any way, thanks again for pointing me to the right direction.

Coordinator
Apr 23, 2012 at 7:25 PM

Glad I could be of some assistance. Unfortunately my time with this project is very limited at the moment so I will not have time to create such a sample, especially since I would have to do quite a bit of research to be able to correctly implement one.

So if someone else has a good example of this I would be happy to accept some contributions.

Dec 9, 2013 at 7:05 PM
decaf wrote:
Hi, As usual when I reply I will just point to MSDN, since they explain things better than I ever could. So take a look at http://msdn.microsoft.com/en-us/library/windows/desktop/aa384590%28v=vs.85%29.aspx for more information about how a restore is supposed to work. AlphaShadow does not provide any functionality for actually performing a restore operation complete with file copying etc. It just illustrates the steps taken in a restore operation, excluding the file copying. This sample is modeled very closely after the VShadow sample application provided with the Windows SDK, so it does not do anything that application does, nor does it do everything that application does. For some information see the following link: http://social.msdn.microsoft.com/forums/en-US/windowssdk/thread/14d970ab-f5c6-4964-9ce5-8cdc27969139. Hope this helps somewhat.
HI,

I'm new to VSS, so this statement is a little confusing to me "AlphaShadow does not provide any functionality for actually performing a restore operation...". Does this mean alphavss implements the vss api but does not have higher level calls for restore?Or,it does not implement the css api yet and restores are not possible?

Also, I have seen it mentioned that writers are not supported. I understand what a writer is, but not sure what this means. When i snap or restore, writers are called, what can't i do that native vss can do?

thanks
Coordinator
Dec 10, 2013 at 6:07 AM
AlphaVSS implements the full API described by IVssBackupComponents (see MSDN). It does not take care of copying data from one location to another.

Regarding writers, AlphaVSS does not implement the interfaces required to create writers that participate in a VSS operation. This is not required for creating backups/restores, only if you are writing for example a database server that wants to have a VSS Writer that participates in snapshot creation.

Hope this clarifies somewhat.
Dec 10, 2013 at 6:27 PM
Thank you,

That does help.

Much appreciated,
Gary