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 版本的兼容性信息。 请注意,如果为指定的 Windows 版本“编译”VSS 应用程序,这意味着该应用程序是使用特定于该版本的头文件和库编译的。

    注意

    硬件提供程序仅在 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 相同。

    注意

    如果为 Windows Server 2003 或更高版本编译了 VSS 应用程序,它也将在更高版本的 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 7 的 Windows SDK (可从 Windows 下载中心获取 )
Windows Server 2008 或 Windows Vista Windows SDK for Windows Server 2008 (可从 Windows SDK Developer Center 获取。)
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 的编写器。