New-AzDataProtectionBackupConfigurationClientObject
Creates new backup configuration object
Syntax
Default (Default)
New-AzDataProtectionBackupConfigurationClientObject
-DatasourceType <DatasourceTypes>
[-ExcludedResourceType <String[]>]
[-IncludedResourceType <String[]>]
[-ExcludedNamespace <String[]>]
[-IncludedNamespace <String[]>]
[-LabelSelector <String[]>]
[-SnapshotVolume <Boolean>]
[-IncludeClusterScopeResource <Boolean>]
[-BackupHookReference <NamespacedNameResource[]>]
[-VaultedBackupContainer <String[]>]
[-IncludeAllContainer]
[-StorageAccountName <String>]
[-StorageAccountResourceGroupName <String>]
[<CommonParameters>]
Description
Creates new backup configuration object
Examples
Example 1: Create a BackupConfiguration for configuring protection with AzureKubernetesService
$backupConfig = New-AzDataProtectionBackupConfigurationClientObject -SnapshotVolume $true -IncludeClusterScopeResource $true -DatasourceType AzureKubernetesService -LabelSelector "key=val","foo=bar" -ExcludedNamespace "excludeNS1","excludeNS2" -BackupHookReference @(@{name='bkphookname';namespace='default'},@{name='bkphookname1';namespace='hrweb'})
ObjectType ExcludedNamespace ExcludedResourceType IncludeClusterScopeResource IncludedNamespace IncludedResourceType LabelSelector SnapshotVolume
---------- ----------------- -------------------- --------------------------- ----------------- -------------------- ------------- --------------
KubernetesClusterBackupDatasourceParameters {excludeNS1, excludeNS2} True {key=val, foo=bar} True
This command can be used to create a backup configuration client object used for configuring backup for a Kubernetes cluster.
BackupHookReferences is a list of references to BackupHooks that should be executed before and after the backup is executed.
Example 2: Create a BackupConfiguration to select specific containers for configuring vaulted backups for AzureBlob.
$storageAccount = Get-AzStorageAccount -ResourceGroupName $resourceGroupName -Name $storageAccountName
$containers=Get-AzStorageContainer -Context $storageAccount.Context
$backupConfig = New-AzDataProtectionBackupConfigurationClientObject -DatasourceType AzureBlob -VaultedBackupContainer $containers.Name[1,3,4]
ObjectType ContainersList
---------- --------------
BlobBackupDatasourceParameters {conabb, conwxy, conzzz}
This command can be used to create a backup configuration client object used for configuring backup for vaulted Blob backup containers.
Parameters
-BackupHookReference
Hook reference to be executed during backup.
To construct, see NOTES section for BACKUPHOOKREFERENCE properties and create a hash table.
Parameter properties
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 from backup
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 from backup
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
-IncludeAllContainer
Switch parameter to include all containers to be backed up inside the VaultStore.
Use this parameter for DatasourceType AzureBlob.
Parameter properties
Type: SwitchParameter
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 backup.
By default this is taken as true.
Parameter properties
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 backup
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 backup
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 backup
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
-SnapshotVolume
Boolean parameter to decide whether snapshot volumes are included for backup.
By default this is taken as true.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-StorageAccountName
Storage account where the Datasource is present.
Use this parameter for DatasourceType AzureBlob.
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
-StorageAccountResourceGroupName
Storage account resource group name where the Datasource is present.
Use this parameter for DatasourceType AzureBlob.
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
-VaultedBackupContainer
List of containers to be backed up inside the VaultStore.
Use this parameter for DatasourceType AzureBlob.
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