New-RecoveryOption
New-RecoveryOption
Allows setting of recovery options for various servers.
Syntax
New-RecoveryOption [-RecoveryLocation] <RecoveryLocation> -GenericDatasource <SwitchParameter> -RecoveryType <RecoveryType> [-TargetServer] <String> [-DPMLibrary <Library>] [-RecoverToReplicaFromTape <Boolean>] [-RestoreSecurity <SwitchParameter>] [-SANRecovery <SwitchParameter>] [-TargetLocation <string>] [<CommonParameters>]
New-RecoveryOption [-TargetServer] <String> -HyperVDatasource <SwitchParameter> [-RecoveryLocation] <RecoveryLocation> -RecoveryType <RecoveryType> [-DPMLibrary <Library>] [-RecoverToReplicaFromTape <Boolean>] [-RestoreSecurity <SwitchParameter>] [-SANRecovery <SwitchParameter>] [-TargetLocation <string>] [<CommonParameters>]
New-RecoveryOption [-RecoveryLocation] <RecoveryLocation> -FileSystem <SwitchParameter> -OverwriteType <OverwriteType> -RecoveryType <RecoveryType> [-TargetServer] <String> [-AlternateLocation <string>] [-DPMLibrary <Library>] [-RecoverToReplicaFromTape <Boolean>] [-RestoreSecurity <SwitchParameter>] [-SANRecovery <SwitchParameter>] [<CommonParameters>]
New-RecoveryOption [-TargetServer] <String> -ClientDatasource <SwitchParameter> -OverwriteType <OverwriteType> [-RecoveryLocation] <RecoveryLocation> -RecoveryType <RecoveryType> [-AlternateLocation <string>] [-DPMLibrary <Library>] [-RecoverToReplicaFromTape <Boolean>] [-RestoreSecurity <SwitchParameter>] [-SANRecovery <SwitchParameter>] [<CommonParameters>]
New-RecoveryOption [-TargetServer] <String> [-RecoveryLocation] <RecoveryLocation> -RecoveryType <RecoveryType> -SQL <SwitchParameter> [-AlternateDatabaseDetails <AlternateDatabaseDetailsType>] [-CopyLogFiles <SwitchParameter>] [-DPMLibrary <Library>] [-LeaveDBInRestoringState <SwitchParameter>] [-LogFileCopyLocation <string>] [-RecoverToReplicaFromTape <Boolean>] [-RestoreSecurity <SwitchParameter>] [-RollForwardRecovery <SwitchParameter>] [-SANRecovery <SwitchParameter>] [-TargetLocation <string>] [<CommonParameters>]
New-RecoveryOption [-RecoveryLocation] <RecoveryLocation> -Exchange <SwitchParameter> -ExchangeOperationType <ExchangeOperationType> -RecoveryType <RecoveryType> [-TargetServer] <String> [-AlternateDatabase <string>] [-AlternateStorageGroup <string>] [-DatabaseName <string>] [-DPMLibrary <Library>] [-IsRecoveryStorageGroup <SwitchParameter>] [-MailboxDisplayName <string>] [-MountDatabaseAfterRestore <SwitchParameter>] [-RecoverToReplicaFromTape <Boolean>] [-RestoreSecurity <SwitchParameter>] [-RollForwardRecovery <SwitchParameter>] [-SANRecovery <SwitchParameter>] [-StorageGroupName <string>] [-TargetLocation <string>] [<CommonParameters>]
New-RecoveryOption [-RecoveryLocation] <RecoveryLocation> -RecoveryType <RecoveryType> -SystemProtectionDatasource [-TargetServer] <String> [-DPMLibrary <Library>] [-RecoverToReplicaFromTape <Boolean>] [-RestoreSecurity <SwitchParameter>] [-SANRecovery <SwitchParameter>] [-TargetLocation <string>] [<CommonParameters>]
New-RecoveryOption [-RecoveryLocation] <RecoveryLocation> -PrimaryDpmServer <SwitchParameter> [-TargetServer] <String> [-DPMLibrary <Library>] [-RecoverToReplicaFromTape <Boolean>] [<CommonParameters>]
New-RecoveryOption [-RecoveryLocation] <RecoveryLocation> -E14Datasource <Boolean> -ExchangeOperationType <ExchangeOperationType> -RecoveryType <RecoveryType> [-TargetServer] <String> [-AlternateDatabase <string>] [-DPMLibrary <Library>] [-IsRecoveryDatabase <SwitchParameter>] [-MountDatabaseAfterRestore <SwitchParameter>] [-RecoverToReplicaFromTape <Boolean>] [-RestoreSecurity <SwitchParameter>] [-RollForwardRecovery <SwitchParameter>] [-SANRecovery <SwitchParameter>] [-TargetLocation <string>] [<CommonParameters>]
New-RecoveryOption [-DPMServerName] <String> [-StagingAreaPath] <String> [-DestinationPath] <String> [-DestinationServerName] <String> [-DatasourceName] <String> -DPMComponentName <Guid> -OverwriteType <OverwriteType> [-DPMLibrary <Library>] [-FileSystemDatasource <SwitchParameter>] [-RecoverToReplicaFromTape <Boolean>] [-RestoreSecurity <SwitchParameter>] [<CommonParameters>]
New-RecoveryOption [-RecoveryLocation] <RecoveryLocation> -RecoveryType <RecoveryType> -SharePoint <SwitchParameter> [-TargetServer] <String> [-DPMLibrary <Library>] [-RecoverToReplicaFromTape <Boolean>] [-RestoreSecurity <SwitchParameter>] [-SANRecovery <SwitchParameter>] [-TargetLocation <string>] [<CommonParameters>]
New-RecoveryOption [-TargetServer] <String> -DatabaseFileTempLocation <string> -ExportFileTempLocation <string> -IntermediateServer <ProductionServer> -IntermediateSqlInstance <string> [-RecoveryLocation] <RecoveryLocation> -RecoveryType <RecoveryType> -SharePointSite <SwitchParameter> [-DPMLibrary <Library>] [-ItemLevelRecoveryType] [-RecoverToReplicaFromTape <Boolean>] [-RestoreSecurity <SwitchParameter>] [-SANRecovery <SwitchParameter>] [-TargetLocation <string>] [-TargetSiteUrl <string>] [<CommonParameters>]
Detailed Description
The New-RecoveryOption cmdlet allows setting of recovery options for file servers, Exchange, SharePoint servers, SharePoint sites, SQL servers and other data sources.
Parameters
-StagingAreaPath
The path to the staging area.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
1 |
-DatasourceName
The name of the data source.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
4 |
-DestinationPath
The recovery location.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
3 |
-DestinationServerName
The name of the server to which data will be recovered.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
2 |
-ClientDatasource
Indicates whether the data being restored is a file system or an application.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-DatabaseFileTempLocation
Temporary location for a database file.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-DPMComponentName
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-DPMServerName
The name of a DPM server.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
0 |
-E14Datasource
Indicates that the data source is from Exchange Server 2010.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-Exchange
Indicates that the current operation is being performed on a Microsoft Exchange data source.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-ExchangeOperationType
Indicates the type of operation to be carried out. The valid values are NoOperation, MailBoxLevelRecovery, and NeedCleanShutdown.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-ExportFileTempLocation
The location of the export file.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-FileSystem
Indicates that the operation is performed on a file system data source.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-GenericDatasource
Indicates that the current operation is being performed on a data source like Microsoft Virtual Server.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-HyperVDatasource
Indicates a Hyper-V data source.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-IntermediateServer
A server used during SharePoint site recovery. It should have a SharePoint farm installed.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-IntermediateSqlInstance
A SQL Server instance used during SharePoint site recovery. It is used to temporarily host a SQL Server database.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-OverwriteType
Indicates the action to be taken when the file being recovered already exists. The possible values are CreateCopy, Skip, and Overwrite.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-PrimaryDpmServer
Indicates that the recovery is to a DPM server.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-RecoveryLocation
Indicates the location to which data is recoved. The valid values are OriginalServer, CopyToFolder, OriginalServerWithDBRename, AlternateExchangeServer, and ExchangeServerDatabase.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
0 |
-RecoveryType
Indicates that the recovery type is Recover or Restore. For Hyper-V, you can only use Recover.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-SharePoint
Indicates that the current operation is being performed on a SharePoint data source.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-SharePointSite
Indicates that the operation is being carried out on a SharePoint site.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-SQL
Indicates that the current operation is being performed on a SQL Server data source.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-SystemProtectionDatasource
Indicates a system protection data source.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-TargetServer
The server to which recovery is made.
When using the New-RecoveryOption cmdlet in a clustered environment, the target server parameter should be in the following format - ResourceGroupName.ClusterName.DomainName.
Attributes
Name | Value |
---|---|
Required? |
true |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
0 |
-AlternateDatabase
The name of an alternate database.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-AlternateDatabaseDetails
The type of database.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-AlternateLocation
The name of an alternate location to which a recovery point must be made.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-AlternateStorageGroup
The name of an alternate storage group for a new recovery point.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-CopyLogFiles
Indicates that the log files have to be copied.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-DatabaseName
The name of a database
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-DPMLibrary
A DPM library object.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-FileSystemDatasource
Indicates that you are recovering a file system data source.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-IsRecoveryDatabase
Indicates that the database is a recovery database.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-IsRecoveryStorageGroup
Indicates whether the recovery is a recovery storage group.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-ItemLevelRecoveryType
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-LeaveDBInRestoringState
This is a switch parameter. If you do not use the parameter, it indicates that the database should be left non-operational but in a restorable state. If you use the parameter, it indicates that the database should be left operational.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-LogFileCopyLocation
The location to which the log files must be copied.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-MailboxDisplayName
The name to be displayed on the mailbox.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-MountDatabaseAfterRestore
Indicates that the database should be automatically mounted after restore.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-RecoverToReplicaFromTape
Indicates that recovery to the replica must happen from a tape.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-RestoreSecurity
Indicates the security settings to use during a restore operation.
This is a switch parameter. When you use the -RestoreSecurity parameter in the cmdlet, it indicates that the security settings from the recovery point will be used. If the -RestoreSecurity parameter is not used, it indicates that the security settings of the destination server will be used.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-RollForwardRecovery
Indicates that the application should be recovered from the latest recovery point and that all logs after that recovery point should be applied to bring the application to the latest state.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-SANRecovery
Indicates that the current operation is being performed on a Storage Area Network (SAN) data source.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-StorageGroupName
Then name of a storage group.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-TargetLocation
The location where the replica has to be stored.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-TargetSiteUrl
The URL to which recovery is made.
Attributes
Name | Value |
---|---|
Required? |
false |
Accept wildcard characters? |
false |
Accept Pipeline Input? |
false |
Position? |
named |
-CommonParameter
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, and OutVariable. For more information, see about_CommonParameters.
Input and Return Types
The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet emits.
Notes
For more information, type "Get-Help New-RecoveryOption -detailed".
For technical information, type "Get-Help New-RecoveryOption -full".Additionally, any updated information about the cmdlet will be available at https://go.microsoft.com/fwlink/?LinkId=95130.
Examples
EXAMPLE 1
New-RecoveryOption -TargetServer test.contoso.com -RecoveryLocation copytofolder -FileSystem -AlternateLocation "f:\restore" -OverwriteType overwrite -RestoreSecurity -RecoveryType Restore
This command recovers the file system to test.domain.com and restores the original security settings.
EXAMPLE 2
$dpmserver = connect-DPMServer DPMServer1
$ps = Get-ProductionServer DPMServer1
$ds = Get-Datasource $ps
$dl = Get-DPMLibrary DPMServer1
$rp = Get-RecoveryPoint $ds
$rop = New-Recoveryoption -Filesystem -RecoverToReplicaFromTape 1 -RecoveryLocation DPMReplicaVolume -DPMLibrary $dl[0] -Targetserver DPMServer1 -overwritetype overwrite
The example outlines the sequence of commands to recover a file server using the replica.
EXAMPLE 3
$pg = Get-ProtectionGroup
$ds = Get-Datasource $pg
$rp = Get-RecoveryPoint -Datasource $ds
$lib = Get-DPMLibrary
$rop = New-RecoveryOption -RecoverToReplicaFromTape 1 -RecoveryLocation DPMReplicaVolume -FileSystem -TargetServer DPMTestServer -OverwriteType Overwrite -RecoveryType Recover -DpmLibrary $lib
Recover-RecoverableItem -RecoverableItem $rp -RecoveryOption $rop
Recover-RecoverableItem -RecoverableItem $rp -RecoveryOption $rop