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 Server 作業系統版本上執行。 它們不會在 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 2008 R2 或 Windows Server 2008 的電腦上,無法使用在 Windows Server 2003 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 的寫入器。