Accidentally deleted all resources in a resource group (including sql servers)

Jonathan Chase 21 Reputation points
2023-04-25T00:48:07.3566667+00:00

I ran an ARM template with deploymentMode complete on the wrong resource group. I am in the process of manually recreating deleted resources but I wanted to know if there are any disaster recovery options for this scenario. It does involve lost sql servers and a large amount of lost data.

Azure Backup
Azure Backup
An Azure backup service that provides built-in management at scale.
1,486 questions
{count} votes

Accepted answer
  1. SwathiDhanwada-MSFT 18,991 Reputation points Moderator
    2023-04-25T05:08:58.9933333+00:00

    @Jonathan Chase Welcome to Microsoft Q & A Community Forum. To redeploy the last successful deployment, add the -RollbackToLastDeployment parameter as a flag.

    New-AzResourceGroupDeployment -Name ExampleDeployment02 `
      -ResourceGroupName $resourceGroupName `
      -TemplateFile c:\MyTemplates\azuredeploy.json `
      -RollbackToLastDeployment
    

    To redeploy a specific deployment, use the -RollBackDeploymentName parameter and provide the name of the deployment. The specified deployment must have succeeded.

    New-AzResourceGroupDeployment -Name ExampleDeployment02 `
      -ResourceGroupName $resourceGroupName `
      -TemplateFile c:\MyTemplates\azuredeploy.json `
      -RollBackDeploymentName ExampleDeployment01
    

    If you have backups of your SQL servers, you can restore them to recover your data. You can use Azure Backup or other backup solutions to create and manage backups of your SQL servers. If you are unable to recover your resources using the above methods, you can contact Azure Support for assistance. They may be able to help you recover your resources or provide guidance on next steps. References : https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/rollback-on-error


0 additional answers

Sort by: Most helpful

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.