Get an overview of the Azure backup and restore functionality of Azure web apps. Learn how to configure the backup and then restore an Azure web app.
- [Instructor] Just because your app and data is in the cloud, doesn't mean that we can forget about backing it up. In this lesson, we're going to explore backing up and restoring our Azure web apps. It's important to understand what exactly is backed up when you back up your web apps. Well, the app configuration is backed up, the file content, the databases connected to that app can also be backed up, but only certain databases are supported for backup. These include, obviously, SQL database, Azure Database for MySQL, that's in preview at the moment, as is Azure Database for PostgreSQL, ClearDB My SQL, and MySQL that's in-app.
There are some considerations you need to be aware of when using the backup functionality for your web app. These include the backup functionality is only available in the standard and premium tiers. The premium tier will allow for more backups, and these are full copies, not incremental. The storage account that these backups are kept in must be in the same subscription as the app itself. And finally, the maximum backup size is 10 gigabytes.
Let's go ahead and pop over to the demo, and I'll show you how we back up and restore our web apps in Azure. I'm going to start by backing up our LIL web app. This is the web app that we've been using throughout this lesson. I've gone ahead and opened the blade for it, and you'll find backups right under settings. Right off the top, we're being told that our backup is not configured. All we need to do is click on configure. The first thing we need to do is set up a storage account because it is not configured. Now I do have a couple of storage accounts already available, but I am going to create a brand new one.
I'm going to click on storage account and I'm going to name it LILwebappbu. Again, this must be a unique name. We don't have a choice in performance. In this case, it's only going to be standard, but you can choose your replication method. In our case, because it's a backup, I'm just going to use LRS. And where's the region that I'd like the storage account to sit? In our case, we're going to put it in Canada Central. Click okay, and after a few moments, our storage account will be created and we can see it here.
I'm going to go ahead and open that. Now I need to provide a container. I'm just going to give it a name, and you'll notice that you can try clicking on the access type but it doesn't do anything, so just provide the name and then click create. You can then go ahead, select that container, then click select, and the storage settings are now configured. We can also go ahead and set up a backup schedule. I'm going to go ahead, turn ours on, and I'm going to back up every day starting on Monday, and I'm not sure if I particularly care for that time, but I'll do it a little bit later.
And you can select your UTC. Next, you'll set the number of retention days. You have the option to keep at least one backup, I'm going to leave it as is. And then finally, we can back up the database as well. Now this is optional, you do not have to back it up, but I'm going to go ahead and include it. That's all there is to it, click, save. Your backup configuration will have been saved. Now, let's show you how to restore it. Since we really don't have anything to restore from here, I have another web app all ready configured with some backups available to us.
It's been running for a few days. Let's go ahead and open up that one. This happens to be in a different resource group called Azure web app restore, and I named it LILwebapprestore. We're in the blade for that app service, and as before, I'm going to scroll down to settings and click backups. Here, you'll notice that we have several backups available to us. I'm going to go ahead and just click on the restore button, I have the option to restore the app backup or I can go right to that storage account.
In this case, it will be a zip file that I can go ahead and pull. To help you keep track of which storage accounts contain the backup, 'cause you'll also have several listed here, this was the one that I just created and here's the one that I have the backups for, for this particular web app. As I said, I've already created this previously. And then I can go ahead and select the zip file if I wish to do that. I could also go ahead and just select the app backup. Here, I could just pick the one based on the date.
Now I have the option to either overwrite or create a new and existing app. Now keep in mind, and there's a warning right here, overwriting on the current app will result in data loss. Please remember that. And then we have some advanced settings, so you could go ahead and enable some of the options. I'm going to leave those, I'm going to go ahead and click okay and now that app will be restored. And that's all there is to it to Azure web app backup and restore.
Very simple to do, and I'd highly recommend that you do this in all of your production apps.
Learn the intermediate-level skills needed to design Azure web and mobile apps for any organization, using the Azure Web Apps and Mobile Apps services. Instructor Sharon Bennett, a Microsoft Certified Solutions Expert, covers securing mobile and web apps with Azure Active Directory, creating WebJobs to script tasks such as queue processing and file maintenance, and extending mobile apps with custom code. Plus, learn how to update, back up, and restore your Azure apps.
As an intermediate-level course, an existing understanding of the Azure platform is required. After completing the training, IT professionals will also be better prepared for Azure certification.
- Create Azure web apps
- Create WebJobs
- Using Traffic Manager
- Adding a CDN to web apps
- Updating, backing up, and restoring Azure Web Apps
- Deploying Azure mobile apps