Your profile

One profile for every MSDEVBUILD site. Only you can see it, and the site owner if you write in.

Lesson 30 of 47
❮Prev Next❯

App Service Backup and Networking

Module 3: Compute ⏱ 12 min read Updated

Your note

My notes for this lesson

Select any text in the lesson to highlight it or add a note. Saved in this browser.

    No highlights yet. Select a sentence in the lesson, then pick a colour or add a note.

    All my bookmarks and notes

    Reading settings

    For every lesson, saved in this browser.

    Text size
    Line spacing
    Font

    With IaaS you rent the virtual machine. Microsoft looks after the building, power and hardware; you patch the operating system.

    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 needed

    Exam 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.

    Azure portal: Configure custom backups, VNet integration and access restrictions Set a daily backup, VNet integration and an office-only rule.
    </> Embed

    Embed this simulation

    Free for trainers, teachers and bloggers. Paste this into your page:

    Loading the portal…

    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
    1. Open Settings → Backups. Automatic backups are already there. For your own schedule, retention and a copy you can download, select Configure custom backups.
    2. 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.
    3. 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.
    4. Choose vnet-fin and an empty subnet, /28 or bigger (/26 recommended). Azure delegates it to Microsoft.Web/serverFarms. This only changes outbound traffic.
    5. Now inbound. Select Public network access → Enabled from select virtual networks and IP addresses, then + Add a rule for the office range.
    6. 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.

    😟 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
    🛠️ Solved with: Backups, VNet integration, access restrictions

    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 backupsCustom backups
    SetupNoneStorage account + container in the same subscription
    FrequencyEvery hour, fixedOn demand, or a schedule you set (for example every 1 day)
    Retention30 days, fixedDays you choose, with “keep at least one backup”
    SizeUp to 30 GBUp to 10 GB, of which up to 4 GB can be databases
    Linked databasesNoYes (Azure SQL, MySQL, PostgreSQL via connection strings)
    DownloadNoYes, 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

    Finance

    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.
    Ready for more?The full lesson adds the technical explanation, when to use it, interview questions and revision notes.

    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.

    Question 1

    Question 1 of 5

    A web app must back up its files, configuration and linked Azure SQL database every day. Backups must be retained for 60 days and must be downloadable.

    What should you configure?

    Question 2

    Question 2 of 5

    A web app must connect to an Azure SQL database that is reachable only through a private endpoint in a virtual network. What should you configure on the web app?

    Question 3

    Question 3 of 5

    You configure an access restriction on a web app with the following rule: priority 100, action Allow, source 203.0.113.0/24. No other rules exist.

    What happens to a request from 198.51.100.10?

    Question 4

    Question 4 of 5

    You need to ensure that a web app is reachable only from a virtual network and has no public inbound access. What should you do?

    Question 5

    Question 5 of 5 · Select 2

    You configure virtual network integration for a web app. Which two requirements must the integration subnet meet? Each correct answer presents part of the solution.

    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. 1.How often do automatic backups run?Show

      Every hour.

    2. 2.Where do custom backups go?Show

      A blob container in a storage account, reached with a SAS URL.

    3. 3.What is the maximum size of a custom backup?Show

      10 GB (app and database content together).

    4. 4.Which service must the integration subnet be delegated to?Show

      Microsoft.Web/serverFarms.

    5. 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

    Studying with a friend? Send them this lesson

    It's free and needs no sign-up. Their progress saves in their own browser.

    Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges. Play ❯

    Install MSDEVBUILD Azure

    Free · no account · works offline

    Save the whole course for offline ›

    Hi, I’m your Nimbus

    Your study buddy. Pick what we do next.

    MSDEVBUILD · Multi-Stack Dev Build

    Sign in to MSDEVBUILD

    One account for Azure certifications and the blog: sign in here and you are signed in on both. Your XP, streak, practice deck and certificate stay in sync on every device. Optional: everything works without an account.