user12566 Asked: 2009-07-13 02:43:45 +0800 CST2009-07-13 02:43:45 +0800 CST 2009-07-13 02:43:45 +0800 CST 如何在 DPM 2007 中重复失败的磁带备份尝试? 772 如果第一次备份尝试失败(例如,如果库中没有磁带,或者库或驱动器中存在间歇性故障),您如何重复保护组的计划备份。 我知道您可以通过在上下文菜单中选择“创建恢复点 - 磁带”来强制备份控制台中的单个受保护元素,但是如何强制对整个保护组进行磁带备份? backup scdpm 1 个回答 Voted Chris S 2013-07-11T10:16:55+08:002013-07-11T10:16:55+08:00 免责声明!这些是我实际使用的清理版本,我不需要测试这些清理版本,因此它们可能包含一两个错误。我很抱歉!如果确实发现错误,请评论/编辑/任何内容,以便其他人不必再次修复它。 如果在 Monitoring -> Alerts 中仍然存在错误,您可以右键单击它并选择 Resume Backups。 如果要创建新备份(受保护服务器上当前的备份) 打开 DPM Shell 并粘贴此脚本: param([string] $dpmname, [string] $pgname) if(!$dpmname) { $dpmname = Read-Host "DPM server" } if(!$pgname) { $pgname = Read-Host "Protection Group Friendly Name" } Write-Output "Creating Tape Recovery Point" trap{"Error in execution... $_";break} &{ Write-Output "Getting protection group $pgname in $dpmname..." $clipg = Get-ProtectionGroup $dpmname | where { $_.FriendlyName -eq $pgname} if($clipg -eq $abc) { Throw "No PG found" } Write-Output "Getting DS from PG $pgname..." $backupds = @(Get-Datasource $clipg) foreach ($ds in $backupds) { Write-Output "Creating Recovery point for $ds..." $j = New-RecoveryPoint -Datasource $ds -Tape -ProtectionType LongTerm $jobtype = $j.jobtype Write-Output "$jobtype Job has been triggerred..." } } 它将询问要备份的服务器和保护组的名称。 如果要将磁盘备份复制到磁带介质(针对整个保护组) 打开 DPM Shell 并粘贴此脚本: param([string] $dpmserver, [string] $pgname, [datetime] $rpdt, [int] $tapeoption) $searchminutes = 10 $libraryindex = 0 if(!$dpmserver) { $dpmserver = Read-Host "DPM server" } if(!$pgname) { $pgname = Read-Host "Protection Group Friendly Name" } if(!$rpdt) { $rpdt = Read-Host "Time of existing Recovery Point" if (($rpdt -as [DateTime]) -ne $null) { $rpdt = [DateTime]::Parse($rpdt) } else { Write-Host 'You did not enter a valid date/time!' } } $rpdt.AddMinutes($serachminutes / 2) if(!$tapeoption) { $tapeoption = Read-Host "Tape Option: 0 = Compress, 1 = Encrypt, 2 = Neither" } Write-Host "Creating $backupoption Recovery Point" trap{"Error in execution... $_";break} &{ Write-Host "-Getting protection group $pgname in $dpmserver..." $clipg = Get-ProtectionGroup $dpmserver | where { $_.FriendlyName -eq $pgname} if(!$clipg) { Throw "No PG found!" } Write-Host "-Getting libraries on $dpmserver..." $libraries = @(Get-DPMLibrary -DPMServerName $dpmserver) if(!$libraries) { Throw "No Tape Drive/Library found!" } Write-Output "--Getting Data Sources from Protection Group $pgname..." $backupds = @(Get-Datasource $clipg) foreach ($ds in $backupds) { Write-Host -NoNewline "---$ds... " $rps = @(Get-RecoveryPoint -Datasource $ds) | Where { (New-TimeSpan -Start $_.RepresentedPointInTime -End $rpdt).TotalMinutes -lt $searchminutes } Write-Host -NoNewline "RPs Found... " foreach ($rp in $rps) { Write-Host -NoNewLine "Creating Job... " $j = Copy-DPMTapeData -RecoveryPoint $rp -SourceLibrary $libraries[$libraryindex] -TapeLabel "asdf" -TapeOption $tapeoption -TargetLibrary $libraries[$libraryindex] Write-Host "Job: $j.status" } } } 注意:如果你知道你在做什么,上面脚本的基本结构是: $libs = @(Get-DPMLibrary -DPMServerName $dpmname) $pg = @(Get-ProtectionGroup -DPMServerName @dpmname) $ds = @(Get-Datasouce -ProtectionGroup $pg[n]) $rp = @(GetRecoverPoint -Datasource $ds[n]) Copy-DPMTapeData -RecoveryPoint $pr[n] -SourceLibrary $libs[n] -TapeLabel "Whatever" -TapeOption $x $TargetLibrary $libs[n]
免责声明!这些是我实际使用的清理版本,我不需要测试这些清理版本,因此它们可能包含一两个错误。我很抱歉!如果确实发现错误,请评论/编辑/任何内容,以便其他人不必再次修复它。
如果要创建新备份(受保护服务器上当前的备份)
打开 DPM Shell 并粘贴此脚本:
它将询问要备份的服务器和保护组的名称。
如果要将磁盘备份复制到磁带介质(针对整个保护组)
打开 DPM Shell 并粘贴此脚本:
注意:如果你知道你在做什么,上面脚本的基本结构是: