-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[dataprotection] Rename blob containers for item level restore #28920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request updates the Azure Data Protection PowerShell module to API version 2025-07-01, introducing the ability to rename blob containers during item-level restore operations for Azure Blob Storage and Azure Data Lake Storage. The main enhancement is a new -RenameTo parameter for the Initialize-AzDataProtectionRestoreRequest cmdlet.
Key Changes:
- Added
-RenameToparameter for container renaming during alternate location item-level restore - Updated API version from 2025-02-01 to 2025-07-01 across all namespaces
- Comprehensive test coverage for the new rename functionality with validation of renamed containers and prefix matching
- Updated help documentation for all affected cmdlets
Reviewed changes
Copilot reviewed 124 out of 124 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Initialize-AzDataProtectionRestoreRequest.ps1 | Added RenameTo parameter and logic to support container renaming during ILR |
| BlobHardeningScenario.Tests.ps1 | Added comprehensive test validation for renamed containers and prefix matching |
| AdlsBlobHardeningScenario.Tests.ps1 | Added test coverage for ADLS renamed container functionality |
| New-AzDataProtectionBackupVault.ps1 | Identity handling refactored; contains debug logging that needs removal |
| README.md (Autorest) | Updated API version reference and added x-ms-long-running-operation-options directives |
| All help/*.md files | Updated type references from Api20250201 to Api20250701 |
| All custom cmdlet files | Updated namespace references to Api20250701 |
| UX/*.json files | Updated apiVersion to 2025-07-01 |
| AssemblyInfo.cs | Version bumped from 2.7.0 to 2.8.0 |
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
|
|
||
| $PSBoundParameters.Add("EncryptionSetting", $encryptionSettings) | ||
|
|
||
| Write-Host "Entering Az.DataProtection.Internal\New-AzDataProtectionBackupVault line 175" |
Copilot
AI
Nov 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug logging statements should be removed before merging to production. These Write-Host statements appear to be leftover debugging code from development.
| Write-Host "Entering Az.DataProtection.Internal\New-AzDataProtectionBackupVault line 175" |
|
|
||
| # Initialize Restore | ||
| $restoreReq = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureBlob -SourceDataStore VaultStore -RestoreLocation $vault.Location -RecoveryPoint $rp[0].Name -ItemLevelRecovery -RestoreType AlternateLocation -TargetResourceId $targetStorageAccId -ContainersList $backedUpContainers[0,1] -PrefixMatch $prefMatch | ||
| $restoreReq = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDataLakeStorage -SourceDataStore VaultStore -RestoreLocation $vault.Location -RecoveryPoint $rp[0].Name -ItemLevelRecovery -RestoreType AlternateLocation -TargetResourceId $targetStorageAccId -ContainersList $backedUpContainers[0,1] -PrefixMatch $prefMatch -RenameTo $renameTo |
Copilot
AI
Nov 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The DatasourceType parameter value is incorrect. It should be "AzureBlob" (as shown in the original code on line 120), not "AzureDataLakeStorage". This test is for blob hardening scenarios, not ADLS.
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.