Lesson 4 of 5 Azure App Service Plans and Web Apps

Backing Up and Restoring App Service Apps

This lesson explains automatic and custom backups, what they include, and how to restore them.

Learning outcomes

After completing this lesson, you will be able to:

  • Distinguish between automatic and custom backups.
  • Identify what backups include and do not restore.
  • Explain how to restore with minimal downtime.

Automatic and custom backups

Backup and restore is supported in the Basic, Standard, Premium and Isolated tiers; in Basic, only the production slot can be backed up. Automatic backups are created every hour without configuration, are kept for 30 days (all hourly backups for three days, then fewer), can be up to 30 GB, and are stored by the platform in the same datacentre; they cannot be downloaded, stopped or configured. Custom backups are configured with a storage account and container, run on demand or on a schedule, and are downloadable.

Automatic backups
ConfigurationNone
FrequencyHourly, fixed
Retention30 days, fixed
Maximum size30 GB
Downloadable, partial, over VNetNo
Choose when Quick recovery from recent mistakes
Custom backups
ConfigurationStorage account and container required
FrequencyOn demand or scheduled (minimum every 2 hours, up to 12 per day)
Retention0 to 30 days, or indefinite
Maximum size10 GB
Downloadable, partial, over VNetYes
Choose when Long retention, downloads, other subscriptions
Sort into groups

Automatic or custom backup?

Exam skills 3.4.6

Decide which kind of App Service backup each requirement needs.

Log in to try this activity Interactive activities are free with an account.

What is backed up and restored

Both types include the app's content (the /home or %HOME% directory, or persistent storage for containers) and its configuration, such as app settings, connection strings, logging and Application Insights settings. They do not restore network features (private endpoints, VNet integration), authentication settings, managed identities, custom domains, TLS bindings, scale settings, alerts or deployment slots. Custom backups can exclude folders with a _backup.filter file and can be written over VNet integration to a firewall-protected storage account. The option to include linked databases in new custom backups has been removed (from November 2025 for MySQL and PostgreSQL and April 2026 for SQL Database), and existing linked database backups stop on 31 March 2028, so databases use their own backup features.

The following diagram shows an App Service backup configuration that takes a backup every 12 hours and keeps it for 90 days.

Backups every 12 hours kept for 90 days and downloadable by compliance. Custom backups go to a storage account container on a 12-hour schedule with retention set to indefinite, because custom retention offers 0 to 30 days or indefinite; a blob lifecycle rule deletes backups older than 90 days. Automatic backups cannot be downloaded and last only 30 days.
The scenario is illustrative.
Sort into groups

Restored or not?

Exam skills 3.4.6

Decide whether restoring a backup brings back each item.

Log in to try this activity Interactive activities are free with an account.

Restoring

From the Backups page, select a backup and Restore it to the same app, an existing or new slot, or a new app, optionally restoring the configuration. Restoring stops the target app and overwrites its files, so restoring to a staging slot and then swapping minimizes downtime. Custom backups can be restored to an app in another subscription by copying the ZIP and XML files to a storage account that the target can reach.

Scenario questions

Restoring with little downtime

Exam skills 3.4.6

Choose the restore approach for each requirement.

Log in to try this activity Interactive activities are free with an account.
Worked example

Meeting retention requirements

A web app in a Standard plan must have backups taken every 12 hours and kept for 90 days, and the compliance team must be able to download them. The app's content is 4 GB. What should you configure?

Configure custom backups to a storage account container with a schedule every 12 hours and retention set to indefinite, and use a blob lifecycle management rule to delete backups older than 90 days, because custom backup retention options are 0 to 30 days or indefinite. Automatic backups cannot be downloaded and are kept for only 30 days. The 4 GB size is within the 10 GB custom backup limit.

Check yourself

Can automatic backups be downloaded?

Show answer

No. Only custom backups, stored in your storage account, can be downloaded.

Exam Tips

Remember for the exam

  • Backups need Basic tier or higher; Basic backs up only the production slot.
  • Automatic backups: hourly, 30 days, not downloadable. Custom: storage account, scheduled, downloadable.
  • Restores do not include custom domains, TLS bindings, network features or identities.
  • Restore to a slot and swap to minimize downtime.