Planning Backup Frequency and Restoration
Your backup plan depends on how often your data changes and how far back you might need to recover. Automatic backups keep data for 30 days, but you cannot change this schedule. With custom backups, you can schedule them as often as every 2 hours and set retention from 0 to 30 days, or even keep them forever. When you need to restore, you can overwrite the current app or restore to a new app or a staging slot. Restoring to a slot and then swapping it into production is the best way to avoid downtime. Remember, a restore replaces everything in the target, and some settings like custom domains or TLS certificates are not included in the backup and must be reconfigured manually.
Execute Restore Procedures and Analyze Backup Limitations
To restore an App Service, you select a previous backup—either automatic or custom—and choose where to put it. You can restore point-in-time to a specific moment. The destination can be the original app (which overwrites it), a completely new app, or a deployment slot. Using a slot is a key best practice: you restore the backup into a staging slot, test it, and then swap it with the production slot for a quick, low-risk recovery. During the restore, you decide whether to include the saved site configuration and any linked database backups that were part of the custom backup.
Critical Backup Constraints and Troubleshooting
Backups have important limits that affect your recovery plan. There are size limits: automatic backups max out at 30 GB, and custom backups at 10 GB (with only 4 GB allowed for databases). A major upcoming change is that custom backups will stop supporting linked databases after March 2028. Backups can fail for common reasons. If the backup job cannot access the storage container, you may need to check network rules or reconfigure the backup schedule. If you hit the size limit, you must exclude files or manage database backups separately. Database backups can also fail if the connection strings in your app settings are wrong or use a non-admin user.
The Role of the App Service Plan Tier
Your ability to back up and restore depends entirely on your App Service plan tier. Only the Basic, Standard, Premium, and Isolated tiers support these operations. If you are on the Basic tier, you can only back up the production slot, not other slots. Higher tiers allow you to back up any slot and restore backups to other App Service Environments. Therefore, your disaster recovery options are directly tied to the pricing and feature tier you select for your app.
Implement Automated Backup Solutions
Configuring Backups with Azure Services
You can implement automated protection for your app using Azure Backup. This service lets you define backup policies that control how often backups run and how long they are kept. After configuration, you must monitor the backup jobs to verify they complete successfully. A key rule for restoration is that an automatic backup can only be restored to a target app within the same App Service Environment. A custom backup offers more flexibility, allowing restoration to a different environment, such as from an older App Service Environment v2 to a newer v3.
Automating Management with Scripts
To manage backups efficiently at scale, you can use automation scripts. Azure CLI and Azure PowerShell provide commands to configure backup schedules, trigger on-demand backups, and list existing backups. This automation is crucial for consistently applying backup policies across many apps in your subscription and for integrating backup checks into your operational routines.
Backup Scope and Common Questions
It's important to know exactly what gets backed up. The backup includes all app files stored in the default home directory for Windows or Linux. It does not include any files stored on separately mounted Azure file shares. Each backup is a full, complete copy of the app at that moment, not an incremental change. While often discussed for web apps, automatic backups are also available for Azure Functions apps that run on dedicated Basic, Standard, or Premium App Service plans.