DPM 2012 SP1 - Problem for export a Database to another server with DPM Powershell
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
May 24th, 2015 5:31pm

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

Free Windows Admin Tool Kit Click here and download it now
May 27th, 2015 11:02pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics