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 7 的 Windows SDK (可从 Windows 下载中心获取)。
Windows Server 2008 或 Windows Vista 适用于 Windows Server 2008 的 Windows 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 2003 的计算机上使用在 Windows Server 2008 R2 或 Windows Server 2008 上创建的卷影副本。 但是,在 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的编写器。