How to Restore Azure Function Apps (Elastic Premium & Dedicated SKUs)

Important Notes Before You Begin
- Supported SKUs:
This guide applies only to Elastic Premium (EP) and Dedicated App Service Plan (ASP) SKUs. Consumption SKU apps cannot currently be restored. If your app was on a Consumption plan, you will need to redeploy the app and associated code manually. - File Storage Check:
If the storage account linked to your Function App still exists, and you were using file storage, check whether the fileshare is still present. The default naming convention follows this pattern:
function app name and four random characters
(e.g.,myfunctionappz1b2
) - This guide is based on the official guide, if anything is out of date, please check there.
Restoring a Function App with File Storage (Elastic Premium)
If your Function App stored its code in a fileshare, it will contain the following application settings:
WEBSITE_CONTENTAZUREFILECONNECTIONSTRING and WEBSITE_CONTENTSHARE
We don’t need to know if the deleted app had these settings however it’s important to understand.

After deletion, the associated file share usually remains intact in your storage account. You can use this to restore your app.
Steps to Restore
- Retrieve Connection Details
- Navigate to your Storage Account.
- Under Access Keys, copy the Connection String.

- Locate Your Fileshare
- Go to Storage Browser > File Shares.
- Look for a share named similar to your old function app (e.g.,
OldFunctionAppName-a1b2
).

- Deploy a New Function App (EP SKU)
- Create a new Function App using the Elastic Premium SKU.
- Ensure that the language and OS match the original app.
- Update Environment Variables
- Navigate to the new Function App > Configuration > Application Settings.
- Update the following:
AzureWebJobsStorage
WEBSITE_CONTENTAZUREFILECONNECTIONSTRING
WEBSITE_CONTENTSHARE
- Use the existing fileshare name and corresponding connection string from above.

Once saved, the Function App will restart. After a few minutes, your original functions and triggers should reappear.

Restoring a Function App on a Dedicated SKU (No File Storage)
Dedicated Function Apps do not use fileshare storage, but you can restore them using Azure PowerShell.

Steps to Restore
- Deploy a Replacement Function App
- Create a new Function App with the same Dedicated App Service Plan (ASP).
- Ensure that the OS and language match the original app.
- This step is crucial — skipping it causes Azure to default to a standard Web App during restore, leading to a conflict error.
- Use PowerShell via Azure Cloud Shell
- Launch Azure Cloud Shell with PowerShell.

- List Deleted Apps
Get-AzDeletedWebApp -ResourceGroupName "FunctionAppRestore"
- Select the Deleted App
$DeletedSites = Get-AzDeletedWebApp -ResourceGroupName "FunctionAppRestore" -Name "DedicatedSKUfunctionapp"
- Validate the Selection
Write-Output $DeletedSites[0]
- If you have multiple sites with the same name, you can select which one you want by modifying the number in that variable. AKA.
Write-Output $DeletedSites[1]
- If you have multiple sites with the same name, you can select which one you want by modifying the number in that variable. AKA.

- Restore the App
Restore-AzDeletedWebApp -TargetResourceGroupName "FunctionAppRestore" -TargetName "RestoredFunctionApp" -TargetAppServicePlanName "DedicatedSKUASP" -InputObject $DeletedSites[0] -Debug
- From this point the Target App will stop, the files will be restored, and the function will be started again automatically.

Important Note
Please note that restoring a dedicated Function app will only work if the platform has created at least 1 backup. So if you just created the app you deleted, deployed code, then deleted it to try out restoring. It might not work.