Note: Because this is an ongoing series, viewers will not receive a certificate of completion.
Skill Level Intermediate
- [Instructor] What do you do when something goes wrong? When you need to recover and come back to a known state? Well this is where having a backup is important, with Azure App Services, I can create a backup and I can restore to it by going out and configuring my environment. I'm gonna show you how we do this with my QuickTipSite. My QuickTipSite is running inside of an app service and if want to do a backup and restore, one of the first things I need to do is get off of the free plan and get into one that supports doing backup and recovery, on the left hand side you can see down here that we have got a number of different features and options and things we can do.
One is the Backup, to setup the Backup, if you look at it, it says you need to be on at least a standard to be able to do a restorable backup, and premium you can create Snapshots. This is a new preview feature. How do I upsize my plan? Well go up to where you've got your application settings where you've got scale up and scale out. Take the scale up option and right now we're running on a free version of the hosting plan, since this is Dev / Test we are going to go into Production where we wanna run our production workloads and down here you can see that one of the things that a standard plan offers, is daily backups, up to 10 times a day with the standard plan.
If I go to the premium plan then you'll see that the number of backups I can do is 50 times a day. We're gonna go head and just switch it to a premium plan, to change the size of your plan is simply clicking the button, it only takes less than a minute to be able to do that and then when we're done, then we can go back over to our Backups and we can configure it. So right now, we can click on this, and make sure that we've upsized our plan, come back over here let's refresh the page.
Sometimes you have to refresh the page just to get it to recognize that we made that change. But now you'll see that in the Backup we have the ability to go out and configure this, when I click on Configure we have to specify a Backup Storage account, this is where we're going to take the contents and where we're going to store it, and in blob storage, just the same way I would do other things, it creates a file into a destination. We're gonna go ahead and create a new storage account for this, and we're gonna call this myquickdemofiles on core.windows.net, I'm going to use a general purpose storage with standard, I'm going to do locally redundant storage and then I'm going to put this into the East US location.
Say OK, this then creates a storage account for me in the same resource group as my website, and when that is done then we need to create a container where we'll put our backups into. We'll give this a second, now that it's been created, we're going to select mydemoquickfiles, create a container a container is going to be a place where I'm going to put my files, I'm going to call it backups and say OK and then select it and once we're done with that then we can specify our Backup Schedule.
We'll schedule this to run every day, and we're going to run starting from now and we'll keep at least 30 of them. We've got the option to keep at least one backup and then also we can have the ability to backup databases. This is where I would take the contents of the data, zip it up and put that into a backup as well, for either SQLAzure or for MySQL. So just click Save and then for more information, let's just click on the Learn more link and that would take you to where it can answer all kinds of questions, like what happens if I have you know at least one left.
But the ideas is that now that it's been backed up I can go out and I can do a restore. So if I click on the Restore I can go up and pick the snapshot for this particular site, and I can say okay well go ahead and take this and restore it, when I restore it I can restore either to the existing app or I can overwrite the current app. If I go to an existing app I can put it into a different slot, so I might have a place that is gonna be like my recovered copy and I can see both of them running at the same time, in a different slot and that's where I would do that.
I can also go into the advanced settings where you can specify, you know the restore of the site configuration, say okay and it's gonna go out and it's gonna recover that site back into where we were before. So that is how we can go out and you can use the automated backup inside of the Azure App Services to be able to make sure you've got a backup plan to go back to where you need to be.