簡體   English   中英

如何以編程方式進行Windows和數據備份?

[英]How to take Windows and Data Backup Programmatically?

我需要使用C#代碼備份Windows數據及其設置。

為了實現該目標,我運行以下命令:

Wbadmin start backup 

命令的來源

問題:

  1. 此命令不適用於所有版本的Windows。

請求

是否有其他可靠的方法來備份Windows數據和設置。

Wbadmin致力於:

Windows Vista Windows Server 2008 Windows 7 Windows 8 Windows 10 Windows Server 2008 R2 Windows Server 2012

這是一個非常標准的推薦解決方案。 除此之外,您還遇到什么問題?

您應該能夠從以下情況使用類似方案2的內容:

https://technet.microsoft.com/zh-CN/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上不起作用,您將收到以下消息:

Warning:  The DELETE SYSTEMSTATEBACKUP command is not supported in this version of Windows.
The operation ended before completion.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM