none
New-DPMRecoveryOption CopyToFolder for an Exchange database backup RRS feed

  • Question

  • I'm trying to restore an Exchange database from DPM 2010 into the file system using powershell. I'm able to perform this action in the DPM GUI simply by selecting the "Copy to a Network Folder" option. When I try this in powershell I fail when creating the recovery option object. Here's what I'm trying:

    $Pg = Get-DPMProtectionGroup –DPMServerName "DPM"
    $Ds = Get-DPMDatasource -ProtectionGroup $Pg[0]
    $RecoveryObject = Get-DPMRecoverypoint -Datasource $Ds[0] | Sort -Property RepresentedPointInTime -Descending | Select-Object -First 1
    $RecoveryOption = New-DPMRecoveryOption -TargetServer "DPM" -RecoveryLocation CopyToFolder -RecoveryType Recover -TargetLocation "f:\test"
    Restore-DPMRecoverableItem -RecoverableItem $RecoveryObject -RecoveryOption $RecoveryOption

    I get the following error on the New-DPMRecoveryOption command:

    New-DPMRecoveryOption : Parameter set cannot be resolved using the specified named parameters.

    I've tried a few dozen permutations of the available options, but I continue to get the same error message. I'm not seeing much documentation to explain all these options. Any guidance is appreciated.

    Monday, February 17, 2014 7:15 PM

All replies

  • try this

    EXAMPLE-1: Recovers the exchange data from tape to R:\ on the Exchange Server
     =====================================================
    
    Below are the DPM Power Shell commands as well as the results of the commands when executed.
    
    PS C:\Program Files\Microsoft DPM\DPM\bin> $pg = Get-ProtectionGroup -DPMServerName Dpmserver1
     PS C:\Program Files\Microsoft DPM\DPM\bin> $pg
    
    Name          Protection method
     ----              -----------------
     SQL             Short-term using disk | Long-term us...
     File Servers  Short-term using disk | Long-term us...
     Mail             Short-term using disk | Long-term us...
     MOSS          Short-term using disk | Long-term us...
    
    
     PS C:\Program Files\Microsoft DPM\DPM\bin> $ds = Get-Datasource -ProtectionGroup $pg[2]
     PS C:\Program Files\Microsoft DPM\DPM\bin> $ds
    
    Computer       Name                    Type
     --------           ----                        ----
     EXCHANGE1   First Storage Group Storage group
     EXCHANGE1   Medium2                Storage group
     EXCHANGE1   Large                     Storage group
     EXCHANGE1   Medium                  Storage group
    
    
     PS C:\Program Files\Microsoft DPM\DPM\bin> $rp = Get-Recoverypoint -Datasource $ds[0]
     PS C:\Program Files\Microsoft DPM\DPM\bin> $rp
    
    Name Backup Time Datasource Location
     ---- ----------- ---------- --------
     First Storage Group 18/09/2009 8:00:... First Storage Gr... Disk
     First Storage Group 19/09/2009 12:00... First Storage Gr... Disk
     First Storage Group 19/09/2009 4:00:... First Storage Gr... Disk
     First Storage Group 19/09/2009 8:00:... First Storage Gr... Disk
     First Storage Group 19/09/2009 12:00... First Storage Gr... Disk
     First Storage Group 19/09/2009 4:00:... First Storage Gr... Disk
     First Storage Group 01/07/2009 8:00:... First Storage Gr... Media
     First Storage Group 01/08/2009 8:00:... First Storage Gr... Media
     First Storage Group 22/08/2009 8:00:... First Storage Gr... Media
     First Storage Group 29/08/2009 8:00:... First Storage Gr... Media
     First Storage Group 01/09/2009 8:00:... First Storage Gr... Media
     First Storage Group 19/09/2009 8:00:... First Storage Gr... Media
    
    
     PS C:\Program Files\Microsoft DPM\DPM\bin> $ri = Get-RecoverableItem -RecoverableItem $rp[10] -BrowseType Child
     PS C:\Program Files\Microsoft DPM\DPM\bin> $ri
    
    Name                      Backup Time           Datasource        Location
     ----                         ----------- ----------   --------
     Mailbox Database    01/09/2009 8:00:...  First Storage Gr... Media
     Mailbox Database2  01/09/2009 8:00:...  First Storage Gr... Media
    
     
    
    PS C:\Program Files\Microsoft DPM\DPM\bin> $lib = Get-DPMLibrary -DPMServerName Dpmserver1
    
    Name                                Drives                 Slots               I/E ports  Protection groups
     ----                                   ------                   -----               ---------   -----------------
     Stand-alone Drive: F...          1                       0                    0
     Library: Firestreame...          5                     200                   0           Mail
    
    
     PS C:\Program Files\Microsoft DPM\DPM\bin> $rop = New-RecoveryOption -Exchange -ExchangeOperationType NeedCleanShutdown -RecoveryType Restore -StorageGroupName "First Storage Group" -TargetLocation "R:\" -TargetServer "exchange1.nwtraders.com" -RecoveryLocation CopyToFolder -dpmlibrary $lib[1]
    
    PS C:\Program Files\Microsoft DPM\DPM\bin> Recover-RecoverableItem -RecoverableItem $ri[0] -RecoveryOption $rop
    
    JobCategory                        Status           HasCompleted
     -----------                            ------             ------------
     RestoreAsFilesFromArchive   InProgress     False
    

    http://social.technet.microsoft.com/Forums/en-US/6833631b-de65-4568-afb8-e2b4f1522fd8/error-id31127-when-trying-to-restore-exchange-2007-mailbox-using-dpm-2007-sp1?forum=dpmexchbackup


    Have a nice day !!!


    Tuesday, February 18, 2014 7:00 AM
    Moderator
  • OR this

    The AlternateHyperVServer option isn't even listed as an option in the Microsoft documentation for the DPM 2012 New-DPMRecoveryOption cmdlet[1]. This documentation also says to use CopyToFolder.

    $rop = New-DPMRecoveryOption -Targetserver host01.domain.local -RecoveryLocation AlternateHyperVServer -HyperVDatasource -RecoveryType Recover -TargetLocation "C:\Users\aeyler\Desktop" 

    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/45295678-ae3c-4c12-99b7-5cecb9184344/dpm-2012-cant-create-newdpmrecoveryoption-the-recovery-point-location-that-you-have-passed-is?forum=dpmpowershell


    Have a nice day !!!


    Tuesday, February 18, 2014 7:03 AM
    Moderator