Hello,
I am wondering if anybody could help me understand in deep how "Operating System enforced Include/Excludes" work. In particular, when using VSS snapshots of MSSQL database files, but not limited to this case (yes, i know the official way to backup MSSQL is TDP...)
Symptoms: The *.mdf and *.ldf files are excluded from my backup, even though I force the inclusion by a client option set rule "Include *.mdf".
Let me start making the questions, the details come after.
Is it really impossible to backup MSSQL database files using just VSS and B/A client? I don't see any reason not to be so. Microsoft documentation mentions the VSS snapshot of database files using SQL Writer as consistent. There is the explanation from IBM that *.mdf files are excluded by operating system via "NotToBackup" registry key. In fact, *.mdf are not present in this key at all, but they still appear in the final include/exclude list. Another explanation could be that VSS itself enforces this exclusion, but I don't believe in this either. When tracing SQL Writer metadata, all *.mdf appear valid and are included as its components. The "exclude path" field writer metadata is empty.
Did you ever investigate on this? Or, is somebody successfully using the hack with client option set?
How include/excludes work in detail? The manual only talks about dsm.opt, client option sets and NotToBackup registry key. How about priority of these sources?
Here comes my investigation:
1) "query inclexcl" output starts with some directory excludes, then there are my server-enforced client options, finally followed by the rest of rules (from operating system and dsm.opt)
...
Excl Directory C:\programdata\Microsoft\Crypto\RSA\MachineKeys Operating System
Excl Directory C:\Boot Operating System
Excl Directory C:\adsm.sys Operating System
Include All *\...*.ldf Server
Include All *\...*.mdf Server
Exclude All C:\Windows\usrclass.dat.log Operating System
Exclude All C:\Windows\usrclass.dat Operating System
Exclude All C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf Operating System
...
According to this output, my database files should be included in any case, whatever rule comes after. They are not.
2) "dsmc prev backup master.mdf" confirms my thoughts
Preview generated on 04/20/2012 16:27:35.
Name: Size: Type: Status: Pattern: Source: Mgmt Class:
C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data\master.mdf 4.00 MB .mdf Included *\...*.mdf Server DEFAULT
3) However, when processing "dsmc selective master.mdf", it is excluded.
Preparing to backup 'c:' using 'VSS' snapshot.
ANS1115W File '\\ondra\c$\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data\master.mdf' excluded by Include/Exclude list
4) I traced the client and in the case of dsmc preview, "Include *.mdf" rule is used, however, in case of selective backup the "Exlude All" operating system rule takes place.
5) When doing VSS snaphosts with other tools (debugging tools, manual snapshot), there is absolutely no problem with *.mdf files. They are included and consistent. Shouldn't it be impossible, once IBM says operating system recommends to exclude these files? Or, the true reason is just to sell TDP for Databases?
Thanks very much for any point!
Pavel
I am wondering if anybody could help me understand in deep how "Operating System enforced Include/Excludes" work. In particular, when using VSS snapshots of MSSQL database files, but not limited to this case (yes, i know the official way to backup MSSQL is TDP...)
Symptoms: The *.mdf and *.ldf files are excluded from my backup, even though I force the inclusion by a client option set rule "Include *.mdf".
Let me start making the questions, the details come after.
Is it really impossible to backup MSSQL database files using just VSS and B/A client? I don't see any reason not to be so. Microsoft documentation mentions the VSS snapshot of database files using SQL Writer as consistent. There is the explanation from IBM that *.mdf files are excluded by operating system via "NotToBackup" registry key. In fact, *.mdf are not present in this key at all, but they still appear in the final include/exclude list. Another explanation could be that VSS itself enforces this exclusion, but I don't believe in this either. When tracing SQL Writer metadata, all *.mdf appear valid and are included as its components. The "exclude path" field writer metadata is empty.
Did you ever investigate on this? Or, is somebody successfully using the hack with client option set?
How include/excludes work in detail? The manual only talks about dsm.opt, client option sets and NotToBackup registry key. How about priority of these sources?
Here comes my investigation:
1) "query inclexcl" output starts with some directory excludes, then there are my server-enforced client options, finally followed by the rest of rules (from operating system and dsm.opt)
...
Excl Directory C:\programdata\Microsoft\Crypto\RSA\MachineKeys Operating System
Excl Directory C:\Boot Operating System
Excl Directory C:\adsm.sys Operating System
Include All *\...*.ldf Server
Include All *\...*.mdf Server
Exclude All C:\Windows\usrclass.dat.log Operating System
Exclude All C:\Windows\usrclass.dat Operating System
Exclude All C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf Operating System
...
According to this output, my database files should be included in any case, whatever rule comes after. They are not.
2) "dsmc prev backup master.mdf" confirms my thoughts
Preview generated on 04/20/2012 16:27:35.
Name: Size: Type: Status: Pattern: Source: Mgmt Class:
C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data\master.mdf 4.00 MB .mdf Included *\...*.mdf Server DEFAULT
3) However, when processing "dsmc selective master.mdf", it is excluded.
Preparing to backup 'c:' using 'VSS' snapshot.
ANS1115W File '\\ondra\c$\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data\master.mdf' excluded by Include/Exclude list
4) I traced the client and in the case of dsmc preview, "Include *.mdf" rule is used, however, in case of selective backup the "Exlude All" operating system rule takes place.
5) When doing VSS snaphosts with other tools (debugging tools, manual snapshot), there is absolutely no problem with *.mdf files. They are included and consistent. Shouldn't it be impossible, once IBM says operating system recommends to exclude these files? Or, the true reason is just to sell TDP for Databases?
Thanks very much for any point!
Pavel