Tuesday, July 26, 2011

More on Bare Metal Restore (DPM 2010)

I’ve some query whether the DPM 2010 (BMR features) can be able to restore Physical to another physical which is not similar specs.

DPM 2010 utilizes Windows backup feature for both SystemState and BMR backups. The support for restoring to dissimilar hardware is defined by Windows and generally speaking, it not supported.  

BMR for Windows 2003 is only possible by using the DPM System Recovery Tool (SRT) a separate installable product that shipped on the DPM 2007 and DPM 2010 installation media.

In either case, nothing is preventing you from restoring to dissimilar hardware, but as noted it isn't supported and may not work 100% of the time (this most probably due to the different hardware drivers, which you may have to reinstall manually) .

For Windows 2003, it has been suggested is the right one like using the SRT for BMR backups. But for Windows 2008 and later OS versions, You can safely rely on the Windows Backup to restore on alternate hardware as well, it is much reliable than earlier Windows 2003 BMR / ASR (another method of System State Backup) recovery.

But some important points note here are, the recovery target has to have higher disk configuration than the backed-up one. If you are restoring a 32 Bit OS backup then you need to use 32 bit Setup/Install media/WINRE media(and same for 64 bit as well).

(WINRE stands for – Windows Recovery Environment)

To be able able to do successful BMR recovery, you have to backup all critical volumes using -allcritical options of Windows backup (DPM uses this option so all DPM BMR backups are BMR able, but it will not have data volumes backup).

Please note that A DPM server cannot protect itself for BMR.

Abstracts from Forum & TechNet

It’s not so straight forward however it’s not impossible.

keywords : BMR , Bare Metal Restore, DPM 2010, Restore from Physical to Virtual

Tuesday, July 5, 2011

DPM–How to Erase the Tapes Manually before expire to be reuse.

I come across one of the many questions, someone asked me if they can erase the tapes manually before it’s expired.  They said they wanted to do some testing to backup to tapes but somehow they can’t be able to find the erasure in the GUI.

So I’m going to share how it is done using PowerShell.

 MY-HV-TES-003-180

Launch the DPM console.  Navigate to the ManagementLibraries .  Take note of it.  Slot 1 to Slot 9 .

Then now open a notepad.  Copy and paste the following (in yellow) to it :

param ([string] $DPMServerName, [string] $LibraryName, [string[]] $TapeLocationList)

if(("-?","-help") -contains $Args[0])
{
Write-Host "Usage: ForceFree-Tape.ps1 [[-DPMServerName] <Name of the DPM server>] [-LibraryName] <Name of the library> [-TapeLocationList] <Array of tape locations>"
Write-Host "Example: Force-FreeTape.ps1 -LibraryName "My library" -TapeLocationList Slot-1, Slot-7"
exit 0
}

if (!$DPMServerName)
{
$DPMServerName = Read-Host "DPM server name: "
if (!$DPMServerName)
{
Write-Error "Dpm server name not specified."
exit 1
}

}
if (!(Connect-DPMServer $DPMServerName))
{
Write-Error "Failed to connect To DPM server $DPMServerName"
exit 1
}

$library = @(Get-DPMLibrary $DPMServerName )
if ($library.count -eq 0)
{
Write-Error "Failed to find library with user friendly name $LibraryName"
exit 1
}

if (!$LibraryName)
{
$library | foreach {$_.userfriendlyname}
$LibraryName = Read-Host "Library name (cut & paste from above): "
if (!$LibraryName)
{

Write-Error "Library name not specified."
exit 1
}
}

if (!$TapeLocationList)
{
$tmp = Read-Host "Tape location: "
$TapeLocationList=$tmp.split(",")
write-host "Processing this slot list..."
$TapeLocationList
if (!$TapeLocationList)
{
Write-Error "Tape location not specified."
exit 1
}
}

foreach ($media in @(Get-Tape -DPMLibrary $library))
{
if ($TapeLocationList -contains $media.Location)
{
if ($media -is [Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.LibraryManagement.ArchiveMedia])
{
foreach ($rp in @(Get-RecoveryPoint -Tape $media))
{
Get-RecoveryPoint -Datasource $rp.Datasource | Out-Null
Write-Verbose "Removing recovery point created at $($rp.RepresentedPointInTime) for tape in $($media.Location)."
Remove-RecoveryPoint -RecoveryPoint $rp -ForceDeletion -Confirm:$false
}

Write-Verbose "Setting tape in $($media.Location) as free."
Set-Tape -Tape $media -Free
}
else
{
Write-Error "The tape in $($media.Location) is a cleaner tape."
}
}
}

 

Save the file and rename it with the extension .ps1

MY-HV-TES-003-181

In my example here, I have a file name as Tape_Erase.ps1 and stored in the D:\PowerShell Scripts directory.

MY-HV-TES-003-193

From the DPM console, I launch the DPM Management Shell (which is the PowerShell)

MY-HV-TES-003-194

Once launch you’ll be able to see the screen as above.

image

Then I change to the directory to where I save my PowerShell Script.  In my case I maneuvered to “D:\PowerShell Scripts”.

MY-HV-TES-003-204

To execute the PowerShell script I keyed in with a ./

In my example my file is name as tape_erase.ps1.  To execute the script I type as ./tape_erase.ps1 .

Then next I keyed in the DPM server name (that is with the tape library).  In my case is MY-VM-DPM-SEC01

Then I key in the tape slot that I want to erase the tape.

I keyed in as Slot-2

Note : the ones in pink are the ones that needs to be change accordingly to your naming of your PowerShell script and your DPM settings.

Then  you’ll be able to see the process followed.

MY-HV-TES-003-208

Another example as above, which I want to erase the tape in Slot-9.  e.g. In some cases the name of slot could be Slot-9 or Slot 9.  So it differs from one tape library to another.

Once it’s done, launch back the DPM Console.

MY-HV-TES-003-205

Click on the Management tab, then on the Libraries tab.

Select the tape that was erase earlier.  In my example is Slot 2<Right-click> on the tape and select Erase tape.

MY-HV-TES-003-206

Click Yes.

MY-HV-TES-003-207

Now the tape is erased and ready to be reuse.

Thank you and hope it helps you.  A special thanks also to Ruud Baars (of Microsoft) for sharing his scripting.

keywords : Data Protection Manager, erase tape before expire in DPM, how to erase tape manually in DPM, PowerShell script to erase tape manually in DPM.