none
DPM Restore to Network Share RRS feed

  • Question

  • I'm using a Powershell script to restore a backup out of DPM. I can get it to restore to a local or USB disk but I can't get it to restore to a network share, no matter if it's the UNC path used or if I map it and then use the drive letter.

    Thoughts?

    %windir%\system32\windowspowershell\v1.0\powershell.exe -PSConsoleFile "C:\Program Files\Microsoft DPM\DPM\bin\dpmshell.psc1" -command ".'C:\SysAdmin\VHD Backup\vm-copy.ps1' -targetlocation Z:\ -pgName 'VM Protection Group 1' -backupSet 'Backup Using Child Partition Snapshot\SVR1'"
    # Create Parameters
    Param(
      [string]$pgName,
      [string]$backupSet,
      [string]$targetlocation
    )
    
    # Setup
    $dpmname = "svr"
    $targetserver  = "svr.domain.site"
    $serverName = "svr.domain.site"
    
    # Create the Recovery Notification to alert when complete
    $notify = New-RecoveryNotification -NotificationType email -NotificationIDList notify@email.com
    
    # Connect to the DPM Server and update available restore points
    Connect-DPMServer $dpmname
    $s = Get-ProductionServer -DPMServerName $dpmname
    Get-Datasource -ProductionServer $s[0] -Inquire
    
    # Manually delete previously restored files if they exist
    
    # Set the recovery options 
    $Rop = New-RecoveryOption -HyperVDatasource -TargetServer $targetserver -RecoveryLocation CopyToFolder -TargetSiteUrl $targetlocation -RecoveryType Restore 
    
    # Get the Protection Group
    $pg = get-protectionGroup -DPMServerName $dpmName | where {$_.friendlyname -eq $PgName}
    
    # Get the VM Backup
    $ds = Get-DataSource -ProtectionGroup $pg | where { $_.name -like $backupSet}
    
    # Get the last Recovery Point of the VM to restore
    $ro = Get-RecoveryPoint -Datasource $ds | sort | select -last 1
    
    # Recover the VM
    Recover-RecoverableItem -RecoverableItem $Ro -RecoveryOption $rop -RecoveryNotification $notify


    Tuesday, May 28, 2013 4:41 PM

Answers

  • To clarify, The restore target is made up of the target server and the local path on that server:

    EG:

    New-DPMRecoveryOption -TargetServer "BLAR.local" -RecoveryLocation CopyToFolder -HyperVDatasource -RecoveryType Recover  -TargetLocation "D:\TestRestore"

    So If you want to recover to a share \\blar.local\TestRestore you'll have to recover to the local path of that share on the target server.

    Thursday, May 30, 2013 6:52 AM