none
DPM 2012 SP1 - Problem for export a Database to another server with DPM Powershell RRS feed

  • Question

  • Hello,
    I'm trying to export an Exchange Database backup from DPM 2012 to another Windows 2008R2 serveur with Powershell but I have a big red error and after search again and again and again the good parameters, I come here for your help.
    With the console, no problem but I don't arrive to the same result by Powershell. Thanks.

    My commands:

    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> $DPMServerName = "HostDPM"
    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> $TargetServerName = "HostTarget"
    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> $TargetLocation  = "H:\Export"
    
    
    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> $Pg = Get-ProtectionGroup -DPMServerName $DPMServerName
    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> $Pg
    
    Name                               ProtectionMethod
    ----                               ----------------
    Protection Group HostExchange    Short-term using disk
    
    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> $Ds = Get-Datasource $Pg | sort -Property Name
    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> $Ds
    
    Computer                   Name                          ObjectType
    --------                   ----                          ----------
    HostExchange               Database01                    Exchange Mailbox Database
    HostExchange               Database02                    Exchange Mailbox Database
    
    
    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> $RecoveryPoints = Get-DPMRecoverypoint -Datasource $Ds[0] | Sort -Property RepresentedPointInTime -Descending
    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> $RecoveryPoints
    
    Name                                            BackupTime                                      Datasource                                     Location
    ----                                            ----------                                      ----------                                     --------
    Database01                                      21/05/2015 08:07:31                             Database01 on computer HostExchange            Disk
    Database01                                      21/05/2015 04:07:07                             Database01 on computer HostExchange            Disk
    Database01                                      21/05/2015 00:07:01                             Database01 on computer HostExchange            Disk
    
    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> $LatestRecoveryPoint = $RecoveryPoints[0]
    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> $LatestRecoveryPoint
    
    Name                                            BackupTime                                      Datasource                                     Location
    ----                                            ----------                                      ----------                                     --------
    Database01                                      21/05/2015 08:07:31                             Database01 on computer HostExchange            Disk
    
    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> $RecoveryOption = New-DPMRecoveryOption -Exchange -ExchangeOperationType NoOperation -RecoveryType Restore -RecoveryLocation CopyToFolder -TargetServer $TargetServerName -TargetLocation $TargetLocation
    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> $RecoveryOption
    
    AlternateStorageGroup     :
    RecoveryStorageGroup      : False
    MountDbAfterRestore       : False
    ExchangeOperation         : NoOperation
    MailboxRecoverySetting    : Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.Exchange.MailboxRecoverySettingType
    RecoveryBehavior          : Restore
    RollForwardRecovery       : False
    RestoreSettings           : Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.RestoreOptions
    AlternateDatabase         :
    LibraryId                 : 00000000-0000-0000-0000-000000000000
    SourceServer              :
    TargetServer              : HostTarget
    RecoverToReplicaFromTape  : False
    IsSANRecovery             : False
    ReferencedRecoveryOptions :
    
    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> Recover-RecoverableItem -RecoveryOption $RecoveryOption -RecoverableItem $LatestRecoveryPoint
    
    Restore-DPMRecoverableItem : The specified recovery options are not valid. (ID: 31095)
    Check the parameters that you are passing to the cmdlet and ensure that these parameters correspond to the data source type that you are attempting to recover.
    At line:1 char:24
    + Recover-RecoverableItem <<<<  -RecoveryOption $RecoveryOption -RecoverableItem $LatestRecoveryPoint
        + CategoryInfo          : NotSpecified: (:) [Restore-DPMRecoverableItem], DlsException
        + FullyQualifiedErrorId : InvalidRecoveryOptions,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.RecoveryCmdLets.RecoverRecoverableItem




    • Edited by Ben-J75 Tuesday, May 26, 2015 1:37 PM
    Sunday, May 24, 2015 5:31 PM

All replies

  • Nobody? :(
    Wednesday, May 27, 2015 10:21 AM
  • Hi Ben,

    I think -RecoveryType should be Recover instead of Restore.

    Kind Regards
    Markus

    $RecoveryOption = New-DPMRecoveryOption -Exchange -ExchangeOperationType NoOperation -RecoveryType Recover -RecoveryLocation CopyToFolder -TargetServer $TargetServerName -TargetLocation $TargetLocation

    Wednesday, May 27, 2015 11:02 PM
  • Hi Ben,

    I think -RecoveryType should be Recover instead of Restore.

    Kind Regards
    Markus

    $RecoveryOption = New-DPMRecoveryOption -Exchange -ExchangeOperationType NoOperation -RecoveryType Recover -RecoveryLocation CopyToFolder -TargetServer $TargetServerName -TargetLocation $TargetLocation

    Hi Markus! Thanks for your answer but I already try this option and DPM did not accept it...

    PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> $RecoveryOption = New-DPMRecoveryOption -Exchange -ExchangeOperationType NoOperation -RecoveryType Recover -RecoveryLocation Cop
    yToFolder -TargetServer $TargetServerName -TargetLocation $TargetLocation
    New-DPMRecoveryOption : The recovery point location that you have passed is invalid. Please try again with a different value. (ID: 31050)
    At line:1 char:40
    + $RecoveryOption = New-DPMRecoveryOption <<<<  -Exchange -ExchangeOperationType NoOperation -RecoveryType Recover -RecoveryLocation CopyToFolder -TargetServer $TargetServerName -TargetLoca
    tion $TargetLocation
        + CategoryInfo          : NotSpecified: (:) [New-DPMRecoveryOption], DlsException
        + FullyQualifiedErrorId : InvalidRecoveryLocation,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.RecoveryCmdLets.NewRecoveryOption
    

    Recover should be THE option But I can't find the good syntax... Grrr! lol

    Thursday, May 28, 2015 8:46 AM