Restore-AzMySqlFlexibleServer suddenly fails with an unexpected error

Bert Heesbeen 0 Reputation points
2024-12-11T10:54:20.3833333+00:00

Restoring a MySql Flexible server from PowerShell suddenly fails.

It has been working for more than a year and now gives an unexpected error.

What should I change?

PS /home/bert> $restorePointInTime = (Get-Date).AddMinutes(-1)

PS /home/bert> $serverToRestore = Get-AzMySqlFlexibleServer -Name bgi-db-test -ResourceGroupName bgiodata

PS /home/bert> Restore-AzMySqlFlexibleServer -InputObject $serverToRestore -Name bgi-db-test-restored -ResourceGroupName bgiodata -RestorePointInTime $restorePointInTime

New-AzMySqlFlexibleServer_CreateExpanded: /usr/local/share/powershell/Modules/Az.MySql/1.2.1/MySql.Autorest/custom/Restore-AzMySqlFlexibleServer_PointInTimeRestore.ps1:189

Line |

189 | Az.MySql.internal\New-AzMySqlFlexibleServer @PSBoundParam …

 |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 | An unexpected error occured while processing the request. Tracking ID: 'dee17bb1-4d63-4d58-bca0-f05b74a1aa0d'

PS /home/bert>

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
878 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,280 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sai Raghunadh M 1,605 Reputation points Microsoft Vendor
    2024-12-11T19:49:02.7733333+00:00

    Hi @Bert Heesbeen

    Thanks for the question and using MS Q&A platform.

    The error you're experiencing when attempting to restore a MySQL Flexible Server in Azure appears to be caused by an unexpected issue with the Restore-AzMySqlFlexibleServer command. Given that this process has been successful for over a year and is now encountering problems, here are some troubleshooting steps you can follow to address the issue

    Make sure that your PowerShell module is up to date. Sometimes, updates can fix bugs or compatibility issues.

    You're using Az.MySql module version 1.2.1. It's worth ensuring that you're using the latest version of the Azure PowerShell modules, as updates might fix known issues with commands like Restore-AzMySqlFlexibleServer.

    If the issue persists, you can create a support ticket via the Azure portal. To do this, go to Help + Support in the portal and submit your issue, along with the tracking ID, for further assistance from Azure support.

    Hope this helps. Do let us know if you any further queries. If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


  2. Ashok Gandhi Kotnana 1,585 Reputation points Microsoft Vendor
    2025-01-02T09:36:21.6833333+00:00

    Hi @Bert Heesbeen ,

    Thanks for reaching out to us.

    Let me take this forward.

    I can see you have 2 questions here

    1. Support ticket link: Free support link to raise a request A) https://support.microsoft.com/en-gb/topic/customer-service-phone-numbers-c0389ade-5640-e588-8b0e-28de8afeb3f2
    2. unable to use Az.MySql module in automation account: A) To use the az mysql command in an Automation Account, ensure you import the az module into the shared gallery of your Automation Account. If you encounter any challenges during the process, feel free to reach out—I'm happy to assist!
       

    Please provide your valuable comments User's image

    Please do not forget to "Accept the answer” wherever the information provided helps you, this can be beneficial to other community members.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.