Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Backup Azure website app settings

Tags:

azure

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.

enter image description here

like image 640
p.campbell Avatar asked Aug 05 '14 21:08

p.campbell


People also ask

Can we setup auto backup in Azure Web Apps?

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.

How do I move my Azure web app?

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.

How do I access my Azure storage on 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.


2 Answers

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.

enter image description here

Click on that link and save it to your desired location.

enter image description here

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.

enter image description here

like image 143
Rick Rainey Avatar answered Nov 13 '22 20:11

Rick Rainey


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.

like image 32
Bruno L. Avatar answered Nov 13 '22 20:11

Bruno L.