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 可在 Volume Shadow Copy Service 7.2 SDK 中取得,該 SDK 可從 https://www.microsoft.com/download/details.aspx?id=23490 下載。 請注意,Win2003\Obj 目錄目錄下的 64 位元 vssapi.lib 檔案可用於 Windows Server 2003 R2、Windows Server 2003 和 Windows XP 的 64 位元版本。 此 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 2008 Windows Server SDK(可於 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 2008 R2 或 Windows Server 2008 上建立的影子副本,無法在執行 Windows Server 2003 的電腦上使用。 然而,在 Windows Server 2008 上建立的影子副本可以在執行 Windows Server 2008 R2 的電腦上使用,反之亦然。

  • 若要支援陰影複製,執行 VSS 的系統必須至少有一個 NTFS 檔案系統。 此檔案系統會裝載陰影複製的「差異區域」。如需詳細資訊,請參閱 系統提供者

  • 假設有一個 NTFS 檔案系統,並提供適當的內容選擇(請參閱 陰影複製內容組態),任何支援的本機檔系統都可以陰影複製。

  • 您只能針對本機掛接的檔案系統製作陰影複製。 掛接遠端共用和其他跨掛接檔系統無法陰影複製。 這些檔案系統只能由提供檔案系統的系統進行陰影複製。

  • 寫入器和要求者應該只指定本機資源。 本機資源是一組檔案,其絕對路徑開頭為驅動器號,且驅動器號無法與遠端共用上掛接的資料夾相關聯。

  • 每個磁碟區的軟體陰影複製數目上限為 512。 不過,根據預設,您只能維護共享資料夾陰影複製功能所使用的64個陰影複製。 若要變更共享資料夾陰影複製功能的限制,請使用 MaxShadowCopies 登錄機碼。

  • 備份元件基礎結構不支援將叢集資源備份為寫入器元件。 若要備份叢集資源,應用程式應該假設路徑是指定之特定叢集節點的本機路徑。

  • [!注意]

    Microsoft 不提供開發者或 IT 專業人員在 Windows(所有版本)上實作線上系統狀態還原的技術支援。

    備份和復原系統狀態時,建議的策略是除了系統狀態寫入器所列舉的檔案之外,還備份和復原系統和開機磁碟區。

    注意

    系統狀態寫入器是將 VSS_USAGE_TYPE 屬性設定為 VSS_UT_BOOTABLESYSTEMSTATE 或 VSS_UT_SYSTEMSERVICE 的寫入器。