Skip to content
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

Update Restore-AzRecoveryServicesBackupItem to support restore to NoZone. #27052

Conversation

SourabhSomnathGholap
Copy link
Contributor

Description

Updated Restore-AzRecoveryServicesBackupItem to enable restore to the NoZone by accepting an input of 0 for the -TargetZoneNumber parameter. Additionally, this PR blocks cross-zonal restoration from snapshot RP

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • For SDK-based development mode, update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • For autorest-based development mode, include the changelog in the PR description.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copy link

azure-client-tools-bot-prd bot commented Jan 28, 2025

️✔️Az.Accounts
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Compute
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Network
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️Az.RecoveryServices
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Breaking Change Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Signature Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️Help Example Check
⚠️PowerShell Core - Windows
Type Cmdlet Example Line RuleName Description Extent Remediation
⚠️ Restore-AzRecoveryServicesBackupItem 7 8 Unassigned_Variable Restore-AzRecoveryServicesBackupItem -WLRecoveryConfig $AnotherInstanceWithLogConfig is a null-valued parameter value. -WLRecoveryConfig Assign value for $AnotherInstanceWithLogConfig.
⚠️ Restore-AzRecoveryServicesBackupItem 9 4 Unassigned_Variable Restore-AzRecoveryServicesBackupItem -RestoreDiskList $restoreDiskLUNs is a null-valued parameter value. -RestoreDiskList Assign value for $restoreDiskLUNs.
⚠️ Restore-AzRecoveryServicesBackupItem 13 3 Unassigned_Variable Get-AzRecoveryServicesBackupRecoveryPoint -Item $item is a null-valued parameter value. -Item Assign value for $item.
⚠️Windows PowerShell - Windows
Type Cmdlet Example Line RuleName Description Extent Remediation
⚠️ Restore-AzRecoveryServicesBackupItem 7 8 Unassigned_Variable Restore-AzRecoveryServicesBackupItem -WLRecoveryConfig $AnotherInstanceWithLogConfig is a null-valued parameter value. -WLRecoveryConfig Assign value for $AnotherInstanceWithLogConfig.
⚠️ Restore-AzRecoveryServicesBackupItem 9 4 Unassigned_Variable Restore-AzRecoveryServicesBackupItem -RestoreDiskList $restoreDiskLUNs is a null-valued parameter value. -RestoreDiskList Assign value for $restoreDiskLUNs.
⚠️ Restore-AzRecoveryServicesBackupItem 13 3 Unassigned_Variable Get-AzRecoveryServicesBackupRecoveryPoint -Item $item is a null-valued parameter value. -Item Assign value for $item.
️✔️Help File Existence Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️File Change Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️UX Metadata Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️PowerShell Core - Linux
️✔️PowerShell Core - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows

if (rp.RecoveryPointTier != 0
&& rp.RecoveryPointTier != RecoveryPointTier.VaultArchive
&& rp.RecoveryPointTier != RecoveryPointTier.SnapshotAndVaultArchive
&& rp.RecoveryPointTier != RecoveryPointTier.Snapshot)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we allowing restore from SnapshotAndVaultStandard RP ? If yes, do we not have the 4HRs restriction on it now ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to have restores form snapshot we used to have restriction of 4 HRs. But now restore from snapshot is blocked from all the regions. In the case of SnapshotAndVaultStandard RP, restore will fall happen from vault standard RP.


### Example 11: Edge zone restore for a managed AzureVM to alternate location
### Example 11: Cross zonal restore for to non-ZonePinned VM to NoZone
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for to --> for

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will correct it.

@SourabhSomnathGholap SourabhSomnathGholap marked this pull request as ready for review February 6, 2025 04:58
@NoriZC
Copy link
Contributor

NoriZC commented Feb 7, 2025

/azp run azure-powershell - security-tools

Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@NoriZC NoriZC self-assigned this Feb 7, 2025
@NoriZC
Copy link
Contributor

NoriZC commented Feb 7, 2025

/azp run azure-powershell - security-tools

Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@NoriZC NoriZC merged commit 5a3bad4 into Azure:main Feb 7, 2025
13 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 7, 2025
…one. (#27052)

* Support for NoZone as targetZone for RestoreAzureRmRecoveryServicesBackupItem

* Update in readme

* minor change

* Update ChangeLog for upcoming release changes

---------

Co-authored-by: NoriZC <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants