Restore-DPMRecoverableItem

Restore-DPMRecoverableItem

Restores a version of the data source to a target location.

構文

Parameter Set: Default
Restore-DPMRecoverableItem [-RecoveryOption] <RecoveryOptions> [[-RecoverableItem] <RecoverableObject[]> ] [-AdhocJobsContext <AdhocJobsContext> ] [-JobStateChangedEventHandler <JobStateChangedEventHandler> ] [-RecoveryNotification <NotificationObject]> ] [-RecoveryPointLocation <RecoverySourceLocation[]> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The Restore-DPMRecoverableItem cmdlet recovers a point in time version of a data source (recovery point), or a child recoverable item within it, to the target location.

パラメーター

-AdhocJobsContext<AdhocJobsContext>

Specifies the context details of the ad hoc job. Do not use this parameter from the Windows PowerShell command line.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-JobStateChangedEventHandler<JobStateChangedEventHandler>

Specifies an event handler for Job.StateChanged events. You can use this parameter to update a GUI that runs in Windows PowerShell, but do not use it in the Windows PowerShell console.

エイリアス

Handler

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-RecoverableItem<RecoverableObject[]>

Specifies a recoverable item object. This is a child item within a recovery point that is recoverable. For example, a Windows file system share or volume, a Microsoft SQL Server database, a Microsoft Exchange storage group, Microsoft SharePoint, Microsoft Virtual Machine, a Microsoft DPM database, system state or a recovery point.

エイリアス

none

必須?

false

位置は?

2

既定値

none

パイプライン入力を許可する

true (ByValue)

ワイルドカード文字を許可する

false

-RecoveryNotification<NotificationObject]>

Specifies a notification to send when recovery is finished. You can use the New-DPMRecoveryNotification cmdlet to create a notification object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-RecoveryOption<RecoveryOptions>

Specifies the recovery options for the data source. You can use the New-DPMRecoveryOption cmdlet to create recovery options.

エイリアス

none

必須?

true

位置は?

1

既定値

none

パイプライン入力を許可する

true (ByValue)

ワイルドカード文字を許可する

false

-RecoveryPointLocation<RecoverySourceLocation[]>

Specifies an array of recovery point locations. To obtain a recovery point location object, use the Get-DPMRecoveryPointLocation cmdlet. You need to specify the location of a recovery point if a recovery item exists in more than one recovery point.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

true (ByValue)

ワイルドカード文字を許可する

false

-Confirm

コマンドレットを実行する前に、ユーザーに確認を求めます。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-WhatIf

コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • For more information, type "Get-Help Restore-DPMRecoverableItem -detailed".

Example 1: Restore a version of a data source to a target location

This example restores a version of a Hyper-V data source to a recovery location.

The first command gets the protection group on the DPM server named DPMServer02 and stores the results in the $Pg variable.

The second command gets the list of data sources for the first protection group in the collection stored in the $Pg variable. The command stores the results in the $Ds variable.

The third command gets the recovery point for the first data source object stored in the $Ds array, and passes it to the Sort-Object cmdlet by using the pipe operator. The Sort-Object cmdlet sorts the collection of recovery points in descending order of the date and time value of the RepresentedPointInTime property. The Select-Object cmdlet selects the first recovery point from the collection and stores it in the $RecoveryObject variable.

The fourth command creates a recovery option for a Hyper-V data source on the server named HVDCenter02. The command specifies AlternateHyperVServer as the recovery location and specifies that DPM stores the replica of the data source in c:\VMRecovery. The command stores the recovery option in the $RecoveryOption variable.

The fifth command restores the data source stored in the $RecoveryObject variable by using the recovery option stored in the $RecoveryOption variable.

PS C:\> $Pg = Get-DPMProtectionGroup –DPMServerName "DPMServer02"
PS C:\> $Ds = Get-DPMDatasource -ProtectionGroup $Pg[0]
PS C:\> $RecoveryObject = Get-DPMRecoverypoint -Datasource $Ds[0] | Sort -Property RepresentedPointInTime -Descending | Select-Object -First 1
PS C:\> $RecoveryOption = New-DPMRecoveryOption -HyperVDatasource -TargetServer "HVDCenter02" -RecoveryLocation AlternateHyperVServer -RecoveryType Recover -TargetLocation “c:\VMRecovery”
PS C:\> Restore-DPMRecoverableItem -RecoverableItem $RecoveryObject -RecoveryOption $RecoveryOption

関連トピック

Get-DPMRecoverableItem

Get-DPMRecoveryPointLocation

New-DPMRecoveryOption

New-DPMRecoveryNotification