New-DPMRecoveryOption

Creates recovery options.

Syntax

New-DPMRecoveryOption
   [[-DPMServerName] <String>]
   [-DPMLibrary <Library>]
   [-RecoverToReplicaFromTape <Boolean>]
   [-OverwriteType] <OverwriteType>
   [-RestoreSecurity]
   [-StagingAreaPath] <String>
   [-DestinationServerName] <String>
   [-DestinationPath] <String>
   [-DatasourceName] <String>
   -DPMComponentName <Guid>
   [-FileSystemDatasource]
   [<CommonParameters>]
New-DPMRecoveryOption
   [-TargetServer] <String>
   [-RecoveryLocation] <RecoveryLocation>
   [-DPMLibrary <Library>]
   [-RecoverToReplicaFromTape <Boolean>]
   [-SANRecovery]
   [-FileSystem]
   [-AlternateLocation <String>]
   [-OverwriteType] <OverwriteType>
   [-RestoreSecurity]
   -RecoveryType <RecoveryType>
   [<CommonParameters>]
New-DPMRecoveryOption
   [-TargetServer] <String>
   [-RecoveryLocation] <RecoveryLocation>
   [-DPMLibrary <Library>]
   [-RecoverToReplicaFromTape <Boolean>]
   [-SANRecovery]
   [-RestoreSecurity]
   [-SQL]
   -RecoveryType <RecoveryType>
   [-RollForwardRecovery]
   [-TargetLocation <String>]
   [-AlternateDatabaseDetails <AlternateDatabaseDetailsType>]
   [-LeaveDBInRestoringState]
   [-CopyLogFiles]
   [-LogFileCopyLocation <String>]
   [<CommonParameters>]
New-DPMRecoveryOption
   [-TargetServer] <String>
   [-RecoveryLocation] <RecoveryLocation>
   [-DPMLibrary <Library>]
   [-RecoverToReplicaFromTape <Boolean>]
   [-SANRecovery]
   [-RestoreSecurity]
   -RecoveryType <RecoveryType>
   [-TargetLocation <String>]
   [-SharePoint]
   [<CommonParameters>]
New-DPMRecoveryOption
   [-TargetServer] <String>
   [-RecoveryLocation] <RecoveryLocation>
   [-DPMLibrary <Library>]
   [-RecoverToReplicaFromTape <Boolean>]
   [-SANRecovery]
   [-RestoreSecurity]
   -RecoveryType <RecoveryType>
   [-TargetLocation <String>]
   [-SharePointSite]
   -DatabaseFileTempLocation <String>
   -IntermediateServer <String>
   -IntermediateSqlInstance <String>
   -ExportFileTempLocation <String>
   [-TargetSiteUrl <String>]
   [-ItemLevelRecoveryType <SharepointRecoveryType>]
   [<CommonParameters>]
New-DPMRecoveryOption
   [-TargetServer] <String>
   [-RecoveryLocation] <RecoveryLocation>
   [-DPMLibrary <Library>]
   [-RecoverToReplicaFromTape <Boolean>]
   [-SANRecovery]
   [-RestoreSecurity]
   -RecoveryType <RecoveryType>
   [-TargetLocation <String>]
   [-GenericDatasource]
   [<CommonParameters>]
New-DPMRecoveryOption
   [-TargetServer] <String>
   [-RecoveryLocation] <RecoveryLocation>
   [-DPMLibrary <Library>]
   [-RecoverToReplicaFromTape <Boolean>]
   [-SANRecovery]
   [-RestoreSecurity]
   -RecoveryType <RecoveryType>
   [-TargetLocation <String>]
   [-HyperVDatasource]
   [<CommonParameters>]
New-DPMRecoveryOption
   [-TargetServer] <String>
   [-RecoveryLocation] <RecoveryLocation>
   [-DPMLibrary <Library>]
   [-RecoverToReplicaFromTape <Boolean>]
   [-SANRecovery]
   [-AlternateLocation <String>]
   [-OverwriteType] <OverwriteType>
   [-RestoreSecurity]
   -RecoveryType <RecoveryType>
   [-ClientDatasource]
   [<CommonParameters>]
New-DPMRecoveryOption
   [-TargetServer] <String>
   [-RecoveryLocation] <RecoveryLocation>
   [-DPMLibrary <Library>]
   [-RecoverToReplicaFromTape <Boolean>]
   [-SANRecovery]
   [-RestoreSecurity]
   -RecoveryType <RecoveryType>
   [-TargetLocation <String>]
   [-SystemProtectionDatasource]
   [<CommonParameters>]
New-DPMRecoveryOption
   [-TargetServer] <String>
   [-RecoveryLocation] <RecoveryLocation>
   [-DPMLibrary <Library>]
   [-RecoverToReplicaFromTape <Boolean>]
   [-SANRecovery]
   [-RestoreSecurity]
   -RecoveryType <RecoveryType>
   [-RollForwardRecovery]
   [-TargetLocation <String>]
   [-Exchange]
   [-AlternateDatabase <String>]
   [-AlternateStorageGroup <String>]
   [-IsRecoveryStorageGroup]
   [-MountDatabaseAfterRestore]
   -ExchangeOperationType <ExchangeOperationType>
   [-MailboxDisplayName <String>]
   [-DatabaseName <String>]
   [-StorageGroupName <String>]
   [<CommonParameters>]
New-DPMRecoveryOption
   [-TargetServer] <String>
   [-RecoveryLocation] <RecoveryLocation>
   [-DPMLibrary <Library>]
   [-RecoverToReplicaFromTape <Boolean>]
   [-SANRecovery]
   [-RestoreSecurity]
   -RecoveryType <RecoveryType>
   [-RollForwardRecovery]
   [-TargetLocation <String>]
   [-E14Datasource]
   [-AlternateDatabase <String>]
   [-IsRecoveryDatabase]
   [-MountDatabaseAfterRestore]
   -ExchangeOperationType <ExchangeOperationType>
   [<CommonParameters>]
New-DPMRecoveryOption
   [-TargetServer] <String>
   [-RecoveryLocation] <RecoveryLocation>
   [-DPMLibrary <Library>]
   [-RecoverToReplicaFromTape <Boolean>]
   [-PrimaryDpmServer]
   [<CommonParameters>]

Description

The New-DPMRecoveryOption cmdlet creates recovery options for file servers, computers that run Exchange Server, SharePoint Server, and Microsoft SQL Server, and other data sources.

Examples

Example 1: Recover a file system

PS C:\>New-DPMRecoveryOption -TargetServer "tsqa.contoso.com" -RecoveryLocation "D:\copytofolder" -FileSystem -AlternateLocation "F:\restore" -OverwriteType Overwrite -RestoreSecurity -RecoveryType Restore

This command creates a recovery option that restores the file system to tsqa.contoso.com and restores the original security settings.

Example 2: Recover a file system by using a replica

PS C:\>Connect-DPMServer -DPMServerName "DPMServer01"
PS C:\> $PServer = Get-DPMProductionServer -DPMServerName "DPMServer01"
PS C:\> $PObjects = Get-DPMDatasource -ProductionServer $PServer
PS C:\> $DpmLibrary = Get-DPMLibrary -DPMServerName "DPoreMServer01"
PS C:\> $RPoint = Get-DPMRecoveryPoint -Datasource $PObjects
PS C:\> $ROption = New-DPMRecoveryOption -Filesystem -RecoverToReplicaFromTape $True -RecoveryLocation DPMReplicaVolume -DPMLibrary $DpmLibrary[0] -TargetServer "DPMServer02" -OverwriteType Overwrite

The first command opens a connection to a DPM server.

The second command gets the computer named DPMServer01. The DPM protection agent is installed on this server. The command stores the server in the $PServer variable.

The third command gets the list of protected and unprotected data on the protection server in $PServer. The command stores the result in the $PObject variable.

The fourth command gets the libraries associated with the DPM server named DPoreMServer01. The command stores the libraries in the $DpmLibrary variable.

The fifth command gets the recovery point for the data source in $PObject, and then stores that recovery point result in the $RPoint variable.

The sixth command creates a recovery option on a file system data source. The command specifies that data is recovered to the replica on the target server named DPMServer02 from a tape.

Example 3: Recover a file system from a replica on tape

PS C:\>$PGroup = Get-DPMProtectionGroup -DPMServerName "DPMServer02"
PS C:\> $PObject = Get-DPMDatasource -ProductionServer $PGroup
PS C:\> $RPoint = Get-DPMRecoveryPoint -Datasource $PObject
PS C:\> $DpmLibraries = Get-DPMLibrary -DPMServerName "DPoreMServer01"
PS C:\> $ROption = New-DPMRecoveryOption -RecoverToReplicaFromTape $True -RecoveryLocation DPMReplicaVolume -FileSystem -TargetServer "DPMServer02" -OverwriteType Overwrite -RecoveryType Recover -DpmLibrary $DpmLibraries
PS C:\> Restore-DPMRecoverableItem -RecoverableItem $RPoint -RecoveryOption $ROption

The first command gets the protection group on the DPM server named DPMServer02. The command stores the result in the $PGroup variable.

The second command gets the protected and unprotected data on the production server in $PServer. The command stores the results in the $PObject variable.

The third command gets the recovery point for the data source in $PObject, and stores that recovery point in the $RPoint variable.

The fourth command gets the libraries associated with the DPM server named DPoreMServer01. The command stores the libraries in the $DpmLibraries variable.

The fifth command creates a recovery option on a file system data source. The command specifies that data is recovered to the replica on the target server named DPMServer02 from a tape.

The sixth command restores a version of the data source in $RPoint by using the recovery option in $ROption.

Required Parameters

-ClientDatasource

Indicates that the restored data is a file system or an application.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DPMComponentName

Specifies the GUID of the data source that DPM recovers.

Type:Guid
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DatabaseFileTempLocation

Specifies a temporary location for the database file.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DatasourceName

Specifies the name of the data source.

Type:String
Position:5
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DestinationPath

Specifies the recovery location.

Type:String
Position:4
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DestinationServerName

Specifies the name of the server to which DPM recovers data.

Type:String
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-E14Datasource

Indicates that the data source is Exchange Server 2010.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Exchange

Indicates that DPM performs the current operation on a Exchange Server data source.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ExchangeOperationType

Specifies the type of operation that DPM performs on a Exchange Server data source.

The acceptable values for this parameter are:

  • NoOperation
  • MailBoxLevelRecovery
  • NeedCleanShutdown
Type:ExchangeOperationType
Parameter Sets:NoOperation, MailBoxLevelRecovery, NeedCleanShutdown
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ExportFileTempLocation

Specifies the location of the export file.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-FileSystem

Indicates that DPM performs the current operation on a file system data source.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-GenericDatasource

Indicates that DPM performs the current operation on a data source such as Microsoft Virtual Server.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-HyperVDatasource

Indicates that the data source is nextref_virtualname.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IntermediateServer

Specifies the server that DPM uses for SharePoint site recovery.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IntermediateSqlInstance

Specifies an instance of SQL Server that DPM uses for SharePoint site recovery. DPM uses the instance of SQL Server to temporarily host a SQL Server database.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OverwriteType

Specifies the action that DPM takes when the file it is recovering already exists.

The acceptable values for this parameter are:

  • CreateCopy
  • Skip
  • Overwrite
Type:OverwriteType
Parameter Sets:Overwrite, NoOverwrite, CopyOnExist
Position:6
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PrimaryDpmServer

Indicates that the server where DPM recovers data is a DPM server.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RecoveryLocation

Specifies the location where DPM recovers data.

The acceptable values for this parameter are:

  • OriginalServer
  • CopyToFolder
  • OriginalServerWithDBRename
  • AlternateExchangeServer
  • ExchangeServerDatabase
Type:RecoveryLocation
Parameter Sets:OriginalServer, CopyToFolder, OriginalServerWithDBRename, AlternateExchangeServer, ExchangeServerDatabase, PrimaryDPMServer, DPMReplicaVolume, AlternateHyperVServer
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RecoveryType

Specifies the recovery type. If you specify the HyperVDatasource parameter, the only valid value is Recover. The acceptable values for this parameter are: Recover or Restore.

Type:RecoveryType
Parameter Sets:Recover, Restore
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SQL

Indicates that DPM performs the current operation on a SQL Server data source.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SharePoint

Indicates that DPM performs the current operation on a SharePoint data source.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SharePointSite

Indicates that DPM performs the current operation on a SharePoint site.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StagingAreaPath

Specifies the path of the staging area.

Type:String
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SystemProtectionDatasource

Indicates that DPM performs the current operation on a system protection data source.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TargetServer

Specifies the target server for recovery.

If you use this cmdlet in a clustered environment, specify the target server parameter in the format ResourceGroupName.ClusterName.DomainName.

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-AlternateDatabase

Specifies the name of an alternate database for recovery.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AlternateDatabaseDetails

Specifies the type of the alternate database.

Type:AlternateDatabaseDetailsType
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AlternateLocation

Specifies an alternate location where System Center 2016 - Data Protection Manager (DPM) creates a recovery point.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AlternateStorageGroup

Specifies an alternate storage group for a new recovery point.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CopyLogFiles

Indicates that DPM copies the log files.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DPMLibrary

Specifies a DPM library object for which this cmdlet creates a recovery option. To obtain a DPM library object, use the Get-DPMLibrary cmdlet.

Type:Library
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DPMServerName

Specifies the name of a DPM server on which this cmdlet acts. If you do not specify a name, the cmdlet uses the name of the current computer.

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DatabaseName

Specifies the name of the database.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-FileSystemDatasource

Indicates that DPM recovers a file system data source.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IsRecoveryDatabase

Indicates that the database is a recovery database.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IsRecoveryStorageGroup

Indicates that the recovery is a recovery storage group.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ItemLevelRecoveryType

Specifies the recovery type.

The acceptable values for this parameter are:

  • RecoveryFarm
  • UnattachedInstance
Type:SharepointRecoveryType
Parameter Sets:RecoveryFarm, UnattachedInstance
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LeaveDBInRestoringState

Indicates that DPM leaves the database non-operational but in a restorable state. Specify this parameter to leave the database operational.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-LogFileCopyLocation

Specifies the location where DPM copies log files.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MailboxDisplayName

Specifies a name that DPM displays on the mailbox.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MountDatabaseAfterRestore

Indicates that DPM mounts the database after it restores the database.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RecoverToReplicaFromTape

Indicates whether recovery to the replica is from a tape.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RestoreSecurity

Indicates that DPM uses the security settings from the recovery point. If you do not specify this parameter, DPM uses the security settings of the destination server.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RollForwardRecovery

Indicates that DPM recovers the application from the latest recovery point and applies all logs after that recovery point to bring the application to the latest state.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SANRecovery

Indicates that DPM performs the current operation on a Storage Area Network (SAN) data source.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StorageGroupName

Specifies the name of the storage group.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TargetLocation

Specifies the location where DPM stores the replica.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TargetSiteUrl

Specifies the URL of the target where DPM recovers data.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

RecoveryOption