App Service Backup and Networking
30-second answer
App Service keeps automatic backups every hour for 30 days with no setup, and you add custom backups when you need your own schedule, retention, linked databases or a copy you can download. A custom backup goes to a blob container in a storage account in the same subscription, through a SAS URL, holds up to 10 GB and needs Basic or higher. Networking has two directions. Outbound: VNet integration lets the app reach private resources through an empty subnet (/28 or larger, /26 recommended) delegated to Microsoft.Web/serverFarms. Inbound: access restrictions allow or deny traffic by IP range, service tag or subnet in priority order, and a private endpoint gives the app a private IP inside your VNet.
Simulate it » No Azure account neededExam objective: 3.4.6 Configure backup for an App Service. 3.4.7 Configure networking settings for an App Service. (Skills measured as of April 17, 2026)
Simulations
Feel it before you read it. No account needed, nothing leaves this page.
Open <strong>Settings → Backups</strong>. Automatic backups are already there. For your own schedule, retention and a copy you can download, select <strong>Configure custom backups</strong>.
👆 Click the glowing item in the portal to continue
Read the steps as text
- Open Settings → Backups. Automatic backups are already there. For your own schedule, retention and a copy you can download, select Configure custom backups.
- Pick a storage account and container in the same subscription, a daily schedule and 30 days retention. Custom backups hold up to 10 GB, including linked databases you tick.
- Open Settings → Networking. It splits inbound (who can reach the app) from outbound (what the app can reach). The app needs a private database, so select Virtual network integration.
- Choose vnet-fin and an empty subnet, /28 or bigger (/26 recommended). Azure delegates it to Microsoft.Web/serverFarms. This only changes outbound traffic.
- Now inbound. Select Public network access → Enabled from select virtual networks and IP addresses, then + Add a rule for the office range.
- The office is allowed, everyone else gets 403. For no public address at all, add a private endpoint and set public access to Disabled.
🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.
🖱️ Drag to rotate · scroll or pinch to zoom
Back up to your own storage
Automatic backups run hourly with no setup. Custom backups write files, configuration and linked databases (up to 10 GB) to a blob container you own, on demand or on a schedule with retention. Basic tier and up.
🤔 What happens if…
Read this tour as text
- A registry feeds Container Instances. Azure Container Registry stores your private images. Container Instances runs them as a container group with the CPU and memory you set and a restart policy: Always, OnFailure or Never. It doesn’t scale itself, and only Premium registries can geo-replicate.
- Container Apps scale on HTTP traffic. Each replica gets an allowed CPU and memory pair (0.5 vCPU with 1 Gi here). An HTTP scale rule adds a replica per 50 concurrent requests, between min and max replicas. With min 0, a quiet app scales to zero.
- The plan is the VMs. An App Service plan is a set of VMs. Every app on the plan runs on every instance. Scale out adds instances (Basic: up to 3). Scale up moves to a bigger or richer tier, which also decides the features you get.
- Autoscale rules (Standard and up). On Standard or Premium, a rules-based autoscale setting watches a metric such as CPU Percentage and adds or removes instances between a minimum and maximum, with a cool-down so it doesn’t flap.
- Prove you own the domain. To map www.contoso-learn.com, App Service needs a TXT record asuid.www holding the app’s verification ID, plus a CNAME from www to the app (an A record for the root domain). Free tier can’t do custom domains.
- Certificate, HTTPS Only, TLS 1.2. A free App Service managed certificate (Basic and up, no wildcards, not exportable) is bound with SNI SSL. HTTPS Only redirects HTTP, and the minimum TLS version (1.2 by default) turns away old clients.
- Back up to your own storage. Automatic backups run hourly with no setup. Custom backups write files, configuration and linked databases (up to 10 GB) to a blob container you own, on demand or on a schedule with retention. Basic tier and up.
- Outbound and inbound are different switches. VNet integration is outbound: the app reaches private resources through a delegated subnet. Inbound is controlled by access restrictions (allow and deny rules by priority) or a private endpoint.
- Staging slot, warm-up, swap. A deployment slot (Standard: 5, Premium v3: 20) is a live copy of the app. Deploy to staging, then swap: App Service warms staging up first, so users never hit a cold start. Slot settings stay with their slot.
The finance portal must be backed up daily, call a database that only lives on a private network, and only accept traffic from the office. Set up backups, outbound VNet integration and inbound access restrictions.
🎓 Education-only simulation. Your lab is saved in this browser, so you can leave and continue later.
😟 THE PROBLEM
A bad release wiped config, and the app can’t reach the private database.
😊 THE SOLUTION
Schedule custom backups, add VNet integration, and restrict inbound access.
- No copy to restore✓ Daily custom backup
- Database is private✓ VNet integration (outbound)
- Open to the internet✓ Access restrictions or private endpoint
Start with a question
Can a shop have a back door to the warehouse and a guard at the front door?
A shop has two doors. The back door goes to the company’s private warehouse, so staff can fetch stock. The front door has a guard who checks a list before letting customers in. And every night the manager photocopies the day’s ledger and locks it in a safe across the road.
App Service has the same three things. VNet integration is the back door: the app goes out to private resources. Access restrictions (or a private endpoint) are the front door: who can come in. Backups are the photocopies, kept in a storage account you own.
Explain it like I’m 10
The technical explanation
Configure backup
| Automatic backups | Custom backups | |
|---|---|---|
| Setup | None | Storage account + container in the same subscription |
| Frequency | Every hour, fixed | On demand, or a schedule you set (for example every 1 day) |
| Retention | 30 days, fixed | Days you choose, with “keep at least one backup” |
| Size | Up to 30 GB | Up to 10 GB, of which up to 4 GB can be databases |
| Linked databases | No | Yes (Azure SQL, MySQL, PostgreSQL via connection strings) |
| Download | No | Yes, it’s a file in your container |
Backup and restore need Basic or higher. Restores can overwrite the app, go to a different app, or go to a deployment slot so you can check the result before users see it.
Portal: web app → Settings → Backups → Configure custom backups. Pick the Storage account and Container, turn Scheduled backup On, set Backup every (days or hours), Start backup schedule from, Retention (Days) and Keep at least one backup, tick any databases, then Configure. Backup Now takes one on demand, Restore brings one back.
SAS_URL="https://stcontosobak01.blob.core.windows.net/webbackups?<sas-token>"
az webapp config backup create -g rg-admin-fin --webapp-name app-contoso-fin01 \
--backup-name fin-before-release --container-url "$SAS_URL"
az webapp config backup update -g rg-admin-fin --webapp-name app-contoso-fin01 \
--container-url "$SAS_URL" --frequency 1d --retention 30 --retain-one true
az webapp config backup restore -g rg-admin-fin --webapp-name app-contoso-fin01 \
--backup-name fin-before-release --container-url "$SAS_URL" --overwrite
New-AzWebAppBackup -ResourceGroupName rg-admin-fin -Name app-contoso-fin01 -StorageAccountUrl $sasUrl -BackupName fin-before-release
Edit-AzWebAppBackupConfiguration -ResourceGroupName rg-admin-fin -Name app-contoso-fin01 -StorageAccountUrl $sasUrl -FrequencyInterval 1 -FrequencyUnit Day -RetentionPeriodInDays 30 -KeepAtLeastOneBackup
To leave files out of a custom backup (logs, caches), add a _backup.filter file listing the paths in the app’s D:\home\site\wwwroot folder (or /home/site/wwwroot on Linux).
Configure networking
Settings → Networking splits the two directions.
Outbound traffic configuration
- Virtual network integration: the app’s calls to private IPs (and, with route all on, which is the default, all its outbound traffic) leave through a subnet of your VNet. Requirements: Basic or higher, an empty subnet used only for this, /28 or larger (/26 recommended so the plan can scale out), delegated to Microsoft.Web/serverFarms. NSGs and route tables on that subnet apply to the app’s outbound traffic.
- Hybrid connections: reach a single host and port on-premises through a relay, without a VPN.
- Outbound addresses: the public IPs the app uses when it calls the internet, useful for partner firewalls.
Inbound traffic configuration
- Public network access: Enabled from all networks, enabled from select virtual networks and IP addresses (access restrictions), or Disabled.
- Access restrictions: rules with a name, Allow or Deny, priority (lowest first, first match wins), and a source: IPv4/IPv6 range, service tag (for example
AzureFrontDoor.Backend), or a subnet through a service endpoint. Once any Allow rule exists, unmatched traffic gets 403. The advanced tool site (SCM/Kudu) can reuse the main rules or have its own. - Private endpoints: a private IP for the app in your VNet, for clients on the VNet, peered VNets or on-premises over VPN or ExpressRoute. Pair it with a private DNS zone (
privatelink.azurewebsites.net) and, if you want, public access Disabled.
az network vnet subnet create -g rg-admin-fin --vnet-name vnet-fin -n snet-app-outbound --address-prefixes 10.20.1.0/26
az webapp vnet-integration add -g rg-admin-fin -n app-contoso-fin01 --vnet vnet-fin --subnet snet-app-outbound
az webapp config access-restriction add -g rg-admin-fin -n app-contoso-fin01 \
--rule-name office --action Allow --ip-address 203.0.113.0/24 --priority 100
Add-AzWebAppAccessRestrictionRule -ResourceGroupName rg-admin-fin -WebAppName app-contoso-fin01 -Name office -Priority 100 -Action Allow -IpAddress 203.0.113.0/24
Architect level Why the integration subnet needs room
Each instance of the plan takes an address in the integration subnet, and scaling or platform upgrades briefly need extra ones. Azure also reserves five addresses in every subnet. A /28 has 16 addresses, so 11 are usable, which a busy plan can run out of. A /26 gives 59 usable addresses and lets several plans share the subnet. You can’t resize a subnet that’s in use, so start bigger than you think.
Real-world business scenario
Contoso Finance (fictional)
- The problem
- A release deleted the finance portal's configuration, nobody had a usable backup, and the portal couldn't reach the new SQL database because it only had a private endpoint. It was also open to the whole internet.
- What they used
- Custom backups every day to a webbackups container, kept 30 days and including the SQL database. VNet integration into a /26 subnet delegated to Microsoft.Web/serverFarms with a private DNS zone for the database. Access restrictions allowing only the office range and the VPN range.
- Why that choice
- Backups they own and can download, a private path to the database without exposing it, and a front door that only staff can open.
- The result
- The next bad release was restored to a staging slot, checked and swapped back in 20 minutes. The penetration test found no public route to the portal from outside the office.
When to use it and when not to
✓ Use it when…
- You need your own backup schedule, retention or downloadable copies.
- The app must call databases or services that only have private addresses.
- Only known networks (an office, Front Door, a VNet) should reach the app.
✕ Think twice when…
- You think VNet integration hides the app from the internet. It doesn't; use a private endpoint.
- Backups need to be bigger than 10 GB. Back up the database with its own service instead.
- The plan is on Free or Shared. Scale up to Basic first.
↔ Alternatives to consider
- Private endpoint for private inbound access with no public address.
- Azure Front Door with an access restriction on its service tag for a global, protected entry point.
- Database point-in-time restore for large databases instead of App Service backups.
Test yourself with exercises
5 original practice questions in the AZ-104 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.
Interview preparation
Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.
Beginner What's the difference between automatic and custom backups?
Model answer
Automatic backups just happen every hour and are kept for 30 days, with no storage account. I can restore from them but can't download them or pick the schedule. Custom backups go to my own storage container, on the schedule and retention I choose, can include linked databases, and I can download them.
Intermediate The app needs to call a SQL database that only has a private endpoint. What do you configure?
Model answer
VNet integration on the app, into an empty subnet of the VNet that can reach the database, delegated to Microsoft.Web/serverFarms. That's outbound. I'd also make sure DNS resolves the database name to its private IP, usually through a private DNS zone linked to the VNet.
Experienced developer How do access restriction rules work?
Model answer
They're evaluated in priority order, lowest number first, and the first match wins. Each rule allows or denies an IPv4 or IPv6 range, a service tag like AzureFrontDoor.Backend, or a subnet through a service endpoint. Once I add an Allow rule, the unmatched action is deny, so anything not listed gets a 403. The SCM (advanced tool) site can use the main rules or its own.
Scenario The security team says the finance app must not have any public inbound address. What's your plan?
Model answer
I'd add a private endpoint for the app in a subnet of the corporate VNet, link a private DNS zone for privatelink.azurewebsites.net, and set Public network access to Disabled. If the app also calls private resources, it gets VNet integration for outbound. Access restrictions alone still leave a public address, just filtered.
Quick revision
Key points
- Automatic backups run hourly, are kept 30 days and need no storage account.
- Custom backups go to a blob container via a SAS URL, up to 10 GB, Basic tier and up, with a schedule and retention.
- Restore over the same app, to another app or to a slot.
- VNet integration is outbound only and needs an empty, delegated subnet (/28 minimum, /26 recommended).
- Access restrictions filter inbound by priority; a private endpoint gives a private inbound IP.
Important terminology
- Automatic backup
- An hourly backup App Service takes for you and keeps for 30 days. You can restore it but not download or schedule it.
- Custom backup
- A backup you configure to your own storage container, on demand or on a schedule, with retention and optional linked databases.
- SAS URL
- A container URL with a shared access signature that lets App Service write backups into your storage account.
- VNet integration
- Outbound connectivity from an app into a virtual network through a delegated subnet. It doesn't give the app a private inbound address.
- Subnet delegation
- Marking a subnet for one service, here Microsoft.Web/serverFarms, so App Service can place its integration there.
- Access restrictions
- An inbound allow and deny list for the app, evaluated by priority, matching IP ranges, service tags or subnets.
- Private endpoint
- A network interface with a private IP from your VNet that receives inbound traffic for the app.
Common mistakes
- Expecting VNet integration to make the app private for inbound traffic.
- Pointing VNet integration at a subnet that already holds VMs or is delegated to another service.
- Forgetting that one Allow rule makes everything else denied.
Exam tips
- "App must reach a private database" = VNet integration (outbound).
- "Only the office IP range may browse the app" = access restriction Allow rule.
- "No public inbound access at all" = private endpoint and public access Disabled.
Five quick revision questions
-
1.How often do automatic backups run?Show
Every hour.
-
2.Where do custom backups go?Show
A blob container in a storage account, reached with a SAS URL.
-
3.What is the maximum size of a custom backup?Show
10 GB (app and database content together).
-
4.Which service must the integration subnet be delegated to?Show
Microsoft.Web/serverFarms.
-
5.In what order are access restrictions evaluated?Show
By priority, lowest number first.
Official references
Finished this lesson? Tick it off. Your progress is saved in this browser.
Next up: App Service Deployment Slots and Swaps
Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges.