Edit

Share via


New-AzDataProtectionRestoreConfigurationClientObject

Creates new restore configuration object

Syntax

Default (Default)

New-AzDataProtectionRestoreConfigurationClientObject
    -DatasourceType <DatasourceTypes>
    [-ExcludedResourceType <String[]>]
    [-IncludedResourceType <String[]>]
    [-ExcludedNamespace <String[]>]
    [-IncludedNamespace <String[]>]
    [-LabelSelector <String[]>]
    [-IncludeClusterScopeResource <Boolean>]
    [-ConflictPolicy <String>]
    [-NamespaceMapping <KubernetesClusterRestoreCriteriaNamespaceMappings>]
    [-PersistentVolumeRestoreMode <String>]
    [-RestoreHookReference <NamespacedNameResource[]>]
    [-ResourceModifierReference <NamespacedNameResource>]
    [-StagingResourceGroupId <String>]
    [-StagingStorageAccountId <String>]
    [<CommonParameters>]

Description

Creates new restore configuration object

Examples

Example 1: Create a RestoreConfiguration for restoring with AzureKubernetesService

$restoreConfig = New-AzDataProtectionRestoreConfigurationClientObject -DatasourceType AzureKubernetesService -PersistentVolumeRestoreMode RestoreWithVolumeData -IncludeClusterScopeResource $true -NamespaceMapping  @{"sourcenamespace1"="targetnamespace1";"sourcenamespace2"="targetnamespace2"} -ExcludedNamespace "excludeNS1","excludeNS2" -RestoreHookReference @(@{name='restorehookname';namespace='default'},@{name='restorehookname1';namespace='hrweb'})
ObjectType                       ConflictPolicy ExcludedNamespace        ExcludedResourceType IncludeClusterScopeResource IncludedNamespace IncludedResourceType LabelSelector PersistentVolumeRestoreMode
----------                       -------------- -----------------        -------------------- --------------------------- ----------------- -------------------- ------------- ---------------------------
KubernetesClusterRestoreCriteria Skip           {excludeNS1, excludeNS2}                      True                                                                             RestoreWithVolumeData

This command can be used to create a restore configuration client object used for Kubernetes cluster restore. RestoreHookReferences is a list of references to RestoreHooks that should be executed during restore.

Parameters

-ConflictPolicy

Conflict policy for restore. Allowed values are Skip, Patch. Default value is Skip

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DatasourceType

Datasource Type

Parameter properties

Type:DatasourceTypes
Default value:None
Accepted values:AzureDisk, AzureBlob, AzureDatabaseForPostgreSQL, AzureDataLakeStorage, AzureKubernetesService, AzureDatabaseForPGFlexServer, AzureDatabaseForMySQL
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExcludedNamespace

List of namespaces to be excluded for restore

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExcludedResourceType

List of resource types to be excluded for restore

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IncludeClusterScopeResource

Boolean parameter to decide whether cluster scope resources are included for restore. By default this is taken as true.

Parameter properties

Type:

Nullable<T>[Boolean]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IncludedNamespace

List of namespaces to be included for restore

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IncludedResourceType

List of resource types to be included for restore

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LabelSelector

List of labels for internal filtering for restore

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NamespaceMapping

Namespaces mapping from source namespaces to target namespaces to resolve namespace naming conflicts in the target cluster. To construct, see NOTES section for NAMESPACEMAPPING properties and create a hash table.

Parameter properties

Type:KubernetesClusterRestoreCriteriaNamespaceMappings
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PersistentVolumeRestoreMode

Restore mode for persistent volumes. Allowed values are RestoreWithVolumeData, RestoreWithoutVolumeData. Default value is RestoreWithVolumeData

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceModifierReference

Resource modifier reference to be executed during restore. To construct, see NOTES section for RESOURCEMODIFIERREFERENCE properties and create a hash table.

Parameter properties

Type:NamespacedNameResource
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RestoreHookReference

Hook reference to be executed during restore. To construct, see NOTES section for RESTOREHOOKREFERENCE properties and create a hash table.

Parameter properties

Type:

NamespacedNameResource[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-StagingResourceGroupId

Staging resource group Id for restore.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-StagingStorageAccountId

Staging storage account Id for restore.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

PSObject