Reputation: 21
I have been trying to develop a tool to do backup/restore of MS SQL Server using SQL Server VSS Writer. I can not get the differntial backup working! I am just curious as to whether anyone ever made differential backup using VSS. Here is what I have been doing:
Am I missing something here? Do we need to start SQL Server VSS Writer using certain parameters or something? I tried different configurations including (Windows Server 2008/ SQL Server 2008)
Upvotes: 0
Views: 964
Reputation: 21
I have been wanting to update this post for a while, but got tied up with all the bugs that I was finding in the program. Couple of folks from Microsoft helped me to nail down to the issue I had. I just want to thank Dileep and Ramesh (I am leaving out their last names for obvious reasons) for helping me get through this.
Here are my findings:
SQL VSS Writer does support differential backup.
When taking a differential backup, do not include "master" component as a component for backup.
Always check for Writer status error after each phase using the following sequence of APIs: GatherWriterStatus(), GetWriterStatusCount(), GetWriterStatus()
If the writer status points to an error, from there on things are unpredictable.
The best place to start looking for finding the working is BETest source code available as part of VSS SDK.
BETest allows backing up single database (Full/Differential) and restore (Full/Differential), so long as you get the /C option correctly. Components syntax is: "{Writer Id}":"Full Component Name" For example, for the database 'Person' on my machine my component info file contained: "{A65FAA63-5EA8-4EBC-9DBD-A0C4DB26912A}":"ABP-PC\SQLEXPRESS\Person";
When doing a differential restore, the full restore needs to be done with "/AdditionalRestores" option.
Hope this helps. If somebody needs some help, update this post and I will get notified. I will help.
Upvotes: 2