Backup – PaaS Compute Options
Since you are hosting mission-critical applications in Azure App Services, it’s important to know about the options available for backup and restore. As the name suggests, the Backup and Restore feature can be used to create a backup manually or on a schedule and restore them in the case of a catastrophic failure. Like a virtual machine backup, you can define a policy for your backup, which includes the schedule and retention period. Using the restore option, you can roll back the app to a previous state by overwriting the existing application data. Also, you can restore to a different app if needed.
Backup operations can back up the following data:
- Configuration of the app
- Content of files
- Database connected to the app, supporting SQL Database, Azure Database for MySQL, Azure Database for PostgreSQL, and MySQL in-app
The following are considerations while using the backup and restore functionality:
- The feature requires having the Standard or Premium tier of Azure App Service plan to utilize the backup and restore feature.
- The backup is taken to a storage account; hence, you need to have a storage account and container in the same subscription you want to back up. Every backup you take comprises a .zip file and an .xml file. The .zip file contains the backup data, and the .xml file acts like a manifest for the contents of the .zip file. You can unzip the .zip file and browse the files or push to another App Service without performing the restore operation.
- The default backup is a full backup. During the restore process, all the content in the App Service is replaced by the backed-up content. Files that are not part of the backup will be deleted.
- Partial backup is also supported. You can specify which files need to be backed up in the case of a partial backup. During the restore of a partial backup, any content in the excluded directories remains untouched; only content that is part of the backup gets overwritten.
- The feature supports the exclusion list to exclude files and directories from backup.
- The backup size can be up to 10 GB of app and database content.
- Backing up to storage accounts behind a firewall is not supported as of now.
- TLS-enabled databases are not supported, and storage accounts using a private endpoint are not supported as of now.
You can configure the Backup and Restore options from the Azure portal by navigating to the Backup blade of the App Service (refer to Figure 9.10).
As you can see in Figure 9.10, you need to configure a storage account for setting up the backup. Also, the option to enable a scheduled backup and database backup is visible.
In this section, you saw how you can create an App Service and configure various features such as deployment slots, custom domains, authentication, continuous integration, and backup. With that, you are moving on to the next service: container instances.

FIGURE 9.10 Backing up an App Service