Editar

Compartilhar via


New-AzDataProtectionBackupConfigurationClientObject

Creates new backup configuration object

Syntax

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.

Type:NamespacedNameResource[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DatasourceType

Datasource Type

Type:DatasourceTypes
Accepted values:AzureDisk, AzureBlob, AzureDatabaseForPostgreSQL, AzureKubernetesService, AzureDatabaseForPGFlexServer, AzureDatabaseForMySQL
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ExcludedNamespace

List of namespaces to be excluded from backup

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

-ExcludedResourceType

List of resource types to be excluded from backup

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

-IncludeAllContainer

Switch parameter to include all containers to be backed up inside the VaultStore. Use this parameter for DatasourceType AzureBlob.

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

-IncludeClusterScopeResource

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

Type:Nullable<T>[Boolean]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IncludedNamespace

List of namespaces to be included for backup

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

-IncludedResourceType

List of resource types to be included for backup

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

-LabelSelector

List of labels for internal filtering for backup

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

-SnapshotVolume

Boolean parameter to decide whether snapshot volumes are included for backup. By default this is taken as true.

Type:Nullable<T>[Boolean]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-StorageAccountName

Storage account where the Datasource is present. Use this parameter for DatasourceType AzureBlob.

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

-StorageAccountResourceGroupName

Storage account resource group name where the Datasource is present. Use this parameter for DatasourceType AzureBlob.

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

-VaultedBackupContainer

List of containers to be backed up inside the VaultStore. Use this parameter for DatasourceType AzureBlob.

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

Outputs

PSObject