我需要使用C#代码备份Windows数据及其设置。
为了实现目标,我运行以下命令:
Wbadmin start backup
SOURCE命令
问题:
请求
是否还有其他可靠的方法来获取Windows数据和设置备份。
答案 0 :(得分:0)
Wbadmin致力于:
Windows Vista Windows Server 2008 Windows 7的 Windows 8 Windows 10 Windows Server 2008 R2 Windows Server 2012
这是一个非常标准的推荐解决方案。你还遇到了什么问题?
答案 1 :(得分:0)
您应该能够使用类似方案#2的内容:
https://technet.microsoft.com/en-us/library/cc742083(v=ws.11).aspx
wbadmin start backup –backupTarget:d: -include:g\folder1,h:\folder2 –systemstate -vsscopy
注意语法部分
也是一个好主意Windows Vista和Windows Server 2008的语法:
wbadmin start backup
[-backupTarget:{<BackupTargetLocation> | <TargetNetworkShare>}]
[-include:<VolumesToInclude>]
[-allCritical]
[-noVerify]
[-user:<UserName>]
[-password:<Password>]
[-noinheritAcl]
[-vssFull]
[-quiet]
Windows 7和Windows Server 2008 R2及更高版本的语法:
Wbadmin start backup
[-backupTarget:{<BackupTargetLocation> | <TargetNetworkShare>}]
[-include:<ItemsToInclude>]
[-nonRecurseInclude:<ItemsToInclude>]
[-exclude:<ItemsToExclude>]
[-nonRecurseExclude:<ItemsToExclude>]
[-allCritical]
[-systemState]
[-noVerify]
[-user:<UserName>]
[-password:<Password>]
[-noInheritAcl]
[-vssFull | -vssCopy]
[-quiet]
在某些情况下,您可能必须检测操作系统并运行wbadmin start systemstatebackup
。您可能会注意到,Windows Vista和Windows Server 2008中缺少systemState标志。请注意wbadmin start systemstatebackup
在Windows 10上不起作用也很重要,您将收到以下消息:< / p>
Warning: The DELETE SYSTEMSTATEBACKUP command is not supported in this version of Windows.
The operation ended before completion.