VSS 應用程式相容性
開發自己的 VSS 應用程式時,您應該遵守下列指導方針和限制。 您可能會發現參考MICROSOFT Windows 軟體開發工具包 (SDK) 中提供的 VSS 要求者、提供者和寫入器範例程式代碼會很有説明。
注意
Windows SDK 只能用於針對 Windows Vista 和更新版本的 Windows作系統版本開發 VSS 應用程式。 它無法用來開發 Windows Server 2003 R2、Windows Server 2003 或 Windows XP 的 VSS 要求者、提供者或寫入器。
Windows Server 2003 R2、Windows Server 2003 和 Windows XP: VSS 可在磁碟區陰影複製服務 7.2 SDK 中取得,您可以從 https://www.microsoft.com/download/details.aspx?id=23490下載。 請注意,Win2003\Obj 目錄下目錄中的 64 位 vssapi.lib 檔案可用於 64 位版本的 Windows Server 2003 R2、Windows Server 2003 和 Windows XP。 此 SDK 也提供 VSS 要求者、提供者和寫入器的範例程式代碼。
編譯 VSS 應用程式
開發要求者時,例如備份應用程式:
- 包含下列標頭:
- Vss.h
VsWriter.h
VsBackup.h - 連結下列連結庫:
- VssApi.Lib
開發寫入器時:
- 包含下列標頭:
- Vss.h
VsWriter.h - 連結下列連結庫:
- VssApi.lib
支援的組態和限制
下列清單描述支援的設定和限制:
VSS 在從 Windows XP 開始的 Windows作系統版本上提供支援。
下表摘要說明跨 Windows 版本的相容性資訊。 請注意,如果 VSS 應用程式是「針對」指定的 Windows 版本進行編譯,這表示應用程式是使用該版本特定的頭檔與連結庫進行編譯。
注意
硬體提供者只會在 Windows 伺服器作系統版本上執行。 它們不會在 Windows 用戶端作系統版本上執行。
注意
在下表中,Windows Server 2008 Service Pack 2 (SP2) 應該視為與 Windows Server 2008 相同。 如需 Windows Server 2008 SP2 的詳細資訊,請參閱 https://go.microsoft.com/fwlink/p/?linkid=178730。 Windows Server 2003 R2 應該視為與 Windows Server 2003 相同。
注意
如果 VSS 應用程式已針對 Windows Server 2003 或更新版本進行編譯,它也會在更新版本的 Windows 上執行。
已針對編譯的 VSS 要求者、寫入器和提供者 | 將會在上執行 |
---|---|
Windows Server 2008 R2 (64 位)、Windows 7 (64 位)、Windows Server 2008 (64 位) 和 Windows Vista (64 位) | Windows Server 2008 R2 (64 位)、Windows 7 (64 位)、Windows Server 2008 (64 位) 和 Windows Vista (64 位) |
Windows Server 2008 R2 (32 位)、Windows 7 (32 位)、Windows Server 2008 (32 位) 和 Windows Vista (32 位) | Windows Server 2008 R2 (32 位)、Windows 7 (32 位)、Windows Server 2008 (32 位) 和 Windows Vista (32 位) |
Windows Server 2003 (64 位) | Windows Server 2008 R2 (64 位)、Windows 7 (64 位)、Windows Server 2008 (64 位)、Windows Vista (64 位)和 Windows Server 2003 (64 位) |
Windows Server 2003 (32 位) | Windows Server 2008 R2 (32 位)、Windows 7 (32 位)、Windows Server 2008 (32 位)、Windows Vista (32 位)和 Windows Server 2003 (32 位) 注意: 要求者也會在 Windows Server 2003 (64 位) 上執行。 |
Windows XP 64 位版本 | Windows Server 2003 (64 位) 和 Windows XP 64 位版本 |
Windows XP (32 位) | Windows XP (32 位) |
編譯 VSS 要求者、寫入器或提供者 | 用 |
---|---|
Windows Server 2008 R2 或 Windows 7 | Windows SDK for Windows 7 (可從 Windows 下載中心取得。 |
Windows Server 2008 或 Windows Vista | Windows SDK for Windows Server 2008 (可從 Windows SDK 開發人員中心取得。 |
Windows Server 2003 R2、Windows Server 2003 或 Windows XP | 磁碟區陰影複製服務 7.2 SDK |
所有 32 位 VSS 應用程式(要求者、提供者和寫入器)都必須以原生 32 位或 64 位應用程式的形式執行。 不支援在 WOW64 下執行它們。
Windows Server 2003 和 Windows XP:支援在 WOW64 下 執行 32 位 VSS 要求者,但不支援系統狀態備份。 不支援在 WOW64 下執行 32 位 VSS 提供者和寫入器。 Windows Vista 和後續版本已移除在 WOW64 下執行 32 位要求者的支援。
在 Windows Server 2003 R2 或 Windows Server 2003 上建立的陰影複製,無法在執行 Windows Server 2008 R2 或 Windows Server 2008 的計算機上使用。 在執行 Windows Server 2003 的電腦上無法使用在 Windows Server 2008 R2 或 Windows Server 2008 上建立的陰影複製。 不過,在 Windows Server 2008 上建立的陰影複製可用於執行 Windows Server 2008 R2 的計算機上,反之亦然。
若要支援陰影複製,執行 VSS 的系統必須至少有一個 NTFS 檔案系統。 此檔案系統會裝載陰影複製的「差異區域」。如需詳細資訊,請參閱 系統提供者。
假設有一個 NTFS 檔案系統,並提供適當的內容選擇(請參閱 陰影複製內容組態),任何支援的本機檔系統都可以陰影複製。
您只能針對本機掛接的檔案系統製作陰影複製。 掛接遠端共用和其他跨掛接檔系統無法陰影複製。 這些檔案系統只能由提供檔案系統的系統進行陰影複製。
寫入器和要求者應該只指定本機資源。 本機資源是一組檔案,其絕對路徑開頭為驅動器號,且驅動器號無法與遠端共用上掛接的資料夾相關聯。
每個磁碟區的軟體陰影複製數目上限為 512。 不過,根據預設,您只能維護共享資料夾陰影複製功能所使用的64個陰影複製。 若要變更共享資料夾陰影複製功能的限制,請使用 MaxShadowCopies 登錄機碼。
備份元件基礎結構不支援將叢集資源備份為寫入器元件。 若要備份叢集資源,應用程式應該假設路徑是指定之特定叢集節點的本機路徑。
[!注意]
Microsoft不提供在 Windows 上實作在線系統狀態還原的開發人員或 IT 專業技術支援(所有版本)。
備份和復原系統狀態時,建議的策略是除了系統狀態寫入器所列舉的檔案之外,還備份和復原系統和開機磁碟區。
注意
系統狀態寫入器是將 VSS_USAGE_TYPE 屬性設定為 VSS_UT_BOOTABLESYSTEMSTATE 或 VSS_UT_SYSTEMSERVICE 的寫入器。