I have an Azure website with a handful of app settings entries. These override those in web.config, the same as you would in IIS.
I'm using this feature to supply values to the app to avoid having them in web.config in the first place. This is to avoid committing sensitive info to a GitHub repo. Some are trivial/non-secret, and some are secret (like phone numbers, API keys, etc.).
Does Azure allow you to export these in anyway? I'd like to avoid copy/pasting them out.
In Azure App Service, you can easily create on-demand custom backups and automatic backups. You can easily restore these backups by overwriting an existing app or by restoring it to a new app or slot. Automatic backup and restore is now in preview for isolated pricing tier for App Service Environment V2 and V3.
For your web app, select Diagnose and solve problems. Then, select Configuration and Management. Select Migration Options. Select the option for recommended steps to move the web app.
In the Azure portal, go into your storage account to grant your web app access. Select Access control (IAM) in the left pane, and then select Role assignments. You'll see a list of who has access to the storage account.
You can get this using Site Control Manager (scm). For example, if your website name is contoso, then open your browser to contoso.scm.azurewebsites.net. Authenticate using the same credentials you use to access the Azure Management Portal. This will land you in the "Kudu" default page where you will find a link to download app settings as a JSON file.
Click on that link and save it to your desired location.
You will get some additional environment settings as part of the JSON file, but you will also get all of your app settings.
If you're just wanting to back things up, you could also use Azure Website Backups.
A useful tool is the Azure Resource Explorer. The login for this is the same as your Azure subscription.
In there you can search for the name of your Web App, and drill down to the "appsettings" node. There is more information on the tool here.
subscriptions --> SubscriptionName --> resourceGroups --> ResourceGroupName --> providers --> Microsoft.Web --> sites --> WebAppName --> config --> appsettings
In the "appsettings" view, you can copy/paste JSON values. Using this in combination with the Site Control Manager (scm) from the previous answer. You can also use PowerShell to get/set these values.
The Resource Explorer page has been useful for me for setting up multiple environments (QA, TEST, STAGE, PROD) with similar configurations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With