简体   繁体   中英

How to restore deleted azure resource groups

One of my resource groups has been deleted by mistake. I am unable to find any option in the azure portal to restore it. Is there any option available to restore deleted resource groups?

Is there any option available to restore deleted resource groups?

Directly, there's no method to restore deleted resource groups. One thing you could do is create a new resource group and find the deployment template used to create resource in the deleted resource group. You can then use that template to recreate the resources.

For future reference, you should lock your resource groups with "CANNOT DELETE" lock to prevent accidental deletes.

It's my understanding that if the resources were created through the portal, then in theory you would (preemptively) be able to export templates per https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/export-template-portal , modify them as necessary, and store them offline somewhere (ideally automate this process on some kind of schedule). Then in the event you need to restore a resource group, you can use those template files to recreate everything at best (at minimum at least have a reference to config details in the json files).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM