Skip to content

Conversation

hiaga
Copy link
Member

@hiaga hiaga commented Oct 1, 2025

Description

Added new cmdlet for reregistration feature

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • 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.
    • 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

@Copilot Copilot AI review requested due to automatic review settings October 1, 2025 06:08
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copy link
Contributor

@Copilot Copilot AI left a 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 PR adds a new cmdlet Redo-AzRecoveryServicesBackupProtection that enables reregistration of backup items between different Recovery Services vaults. The feature allows users to move backup protection for Azure VMs, SQL workloads, and Azure File Shares from one vault to another while preserving data and applying new policies.

Key changes include:

  • Added the new Redo-AzRecoveryServicesBackupProtection cmdlet with comprehensive parameter support
  • Implemented helper classes and methods to handle container unregistration, workload discovery, and protection reconfiguration
  • Added test coverage for Azure VM reregistration scenarios

Reviewed Changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
Redo-AzRecoveryServicesBackupProtection.md Documentation for the new cmdlet with syntax, parameters, and usage examples
Az.RecoveryServices.md Updated module documentation to include the new cmdlet
ChangeLog.md Added changelog entry for the reregistration feature
Az.RecoveryServices.psd1 Exported the new cmdlet in module manifest
RSBackupVaultCmdletBase.cs Enhanced job handling methods to support returning job objects
CmdletHelper.cs New helper class with container management and protectable item discovery logic
BackupUtils.cs Added utility methods for job status checking and resource name extraction
RedoAzureRmRecoveryServicesBackupProtection.cs Main cmdlet implementation handling the three-step reregistration process
ItemTests.ps1 PowerShell test script for Azure VM reregistration scenarios
ItemTests.cs C# test class integration for the new test
Provider classes Updated to handle optional parameters in reregistration scenarios


// Step 3: Configure backup in target vault
WriteVerbose("Configuring backup in target vault now");
// chck : switch context to the target vault's subscription
Copy link
Preview

Copilot AI Oct 1, 2025

Choose a reason for hiding this comment

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

Comment contains typo: 'chck' should be 'check'. This appears to be a development note that should be completed or removed.

Suggested change
// chck : switch context to the target vault's subscription
// Check: switch context to the target vault's subscription

Copilot uses AI. Check for mistakes.

Copy link
Member Author

Choose a reason for hiding this comment

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

this note is for later

@hiaga hiaga changed the title [RecoveryServices.Backup] [Ignite] Added new cmdlet for reregistration fetaure [RecoveryServices.Backup] [Ignite] Added new cmdlet for reregistration feature Oct 1, 2025
@isra-fel
Copy link
Member

isra-fel commented Oct 1, 2025

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@hiaga hiaga force-pushed the hiaga/Reregistration branch from 139090e to c96d190 Compare October 1, 2025 08:46
@isra-fel
Copy link
Member

isra-fel commented Oct 1, 2025

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@hiaga
Copy link
Member Author

hiaga commented Oct 1, 2025

@isra-fel all checks have passed

@isra-fel isra-fel changed the base branch from main to release-2025-10-14 October 2, 2025 07:16
Copy link

github-actions bot commented Oct 2, 2025

This PR was labeled "needs-revision" because it has unresolved review comments or CI failures.
Please resolve all open review comments and make sure all CI checks are green. Refer to our guide to troubleshoot common CI failures.

@hiaga hiaga force-pushed the hiaga/Reregistration branch from c96d190 to 1b78f2d Compare October 3, 2025 06:28
@hiaga hiaga assigned isra-fel and VeryEarly and unassigned hiaga Oct 3, 2025
@isra-fel
Copy link
Member

isra-fel commented Oct 3, 2025

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@isra-fel isra-fel merged commit 79315c2 into Azure:release-2025-10-14 Oct 3, 2025
13 checks passed
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