| author | AbhishekMallick-MS |
|---|---|
| ms.service | azure-backup |
| ms.topic | include |
| ms.date | 05/30/2024 |
| ms.author | v-abhmallick |
Once all the relevant permissions are set, configure blob backup by running the following commands:
-
Create a new backup configuration object to specify the set of containers you want to back up. To back up all containers, pass the
-IncludeAllContainerparameter. To back up specific containers, pass the list of containers to the-VaultedBackupContainerparameter.$backupConfig=New-AzDataProtectionBackupConfigurationClientObject -DatasourceType AzureBlob -IncludeAllContainer -StorageAccountResourceGroupName "StorageRG" -StorageAccountName "testpscmd" -
Prepare the relevant request by using the relevant vault, policy, storage account, and the backup configuration object created in the above step using the Initialize-AzDataProtectionBackupInstance command.
$instance=Initialize-AzDataProtectionBackupInstance -DatasourceType AzureBlob -DatasourceLocation $TestBkpVault.Location -PolicyId $blobBkpPol.Id -DatasourceId $SAId -BackupConfiguration $backupConfig -
Submit the request to protect the blobs within the storage account using the New-AzDataProtectionBackupInstance command.
New-AzDataProtectionBackupInstance -ResourceGroupName "StorageRG" -VaultName $TestBkpVault.Name -BackupInstance $instance