-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Backup] az backup restore restore-disks
: Add support for disk restore in edge-zone backups and support for TWN + TNW CRR
#28150
Conversation
️✔️AzureCLI-FullTest
|
|
rule | cmd_name | rule_message | suggest_message |
---|---|---|---|
backup restore restore-disks | cmd backup restore restore-disks added parameter restore_to_edge_zone |
Backup |
az backup restore restore-disks
: Add support for disk restore in edge-zone backups and support for TWN + TNW CRR
result = client.begin_register(vault_name, resource_group_name, fabric_name, container_name, param, | ||
cls=cust_help.get_pipeline_response, polling=False).result() |
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.
May I ask why you need to disable the logic of polling in the code?
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 SDK was changed to return LROPoller instead, so I made the change to parse it correctly.
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.
Yes, what I mean is what problems would there be if using polling?
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.
You can try to obtain results from LROPoller
in the following ways
return LongRunningOperation(cmd.cli_ctx)(validation_poller) |
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.
Yes, what I mean is what problems would there be if using polling?
I'm not entirely sure, honestly. I'm just following the pattern we've been using previously in our code:
trigger_restore_request, cls=cust_help.get_pipeline_response, polling=False).result() |
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.
Okay, you can keep the original code style for now. If you have a need of progress bar for long running operation, you can consider changing the code style to the one we recommend in the future.
Related command
az backup restore restore-disks
Description
Added the
--restore-to-edge-zone
three-state-flag parameter forrestore-disks
. When this parameter is provided, and for OriginalLocation restores, the extendedLocation property of the trigger restore request body is populated with the equivalent details from the recovery point.Testing Guide
For a VM deployed to an edge zone, backed up to a vault, we can trigger a restore with:
--restore-mode OriginalLocation
, or--restore-to-edge-zone
and we should be able to back up successfully. If we inspect request body, it will contain an ExtendedLocation element.
Automated tests have not been written as the testing subscription does not have edge zones enabled yet, but it has been tested manually.
History Notes
[Backup] Add support for disk restore in edge-zone backups
[Backup] Support for Taiwan North and Taiwan North-West Cross region restore
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.