Microsoft Azure AZ-801 — Section 11: Manage backup and recovery for windows Server Part 3

Microsoft Azure AZ-801 — Section 11: Manage backup and recovery for windows Server Part 3

69. Create a backup policy

Let’s talk now about how we can create backup policies in regards to our recovery services vault.

So, here I am on portal.azure.com. I can go to my Recovery Services vault just by clicking this. I can also go to all services menu on all services and search for it or resource groups. Go ahead and go into my recovery services vault right here. All right. And we’re going to go into the vault itself. And I’m going to go down here to where it says a backup policy. So, there’s I’m under the manage area. There is a blade called backup policies. And there they are.

Now, you do have some that are just built in and you have some that can be created when you set your creation of a backup. It’s like, for example, this one right here was created when I set up a backup for an Azure file share. But I do have a default one here for it for virtual machines, enhanced policy, and you can click on those and look at them. But what I want to do is click Add. And we’re going to go into Azure file share option and then we’ll give it a name. We’ll say backup policy demo, and then I could set the frequency. So, this is ultimately what a backup policy is. This is going to set the how frequently you want this to back up, right? So it could be daily or hourly, I can say every 4 hours, 6 hours, 8 hours, 12 hours. I could schedule the start time to be like 8 a.m. and the duration 12 hours. And you can also set the time zone to whatever you want the time zone to be. And then you’ve also got a retention period.

So, you can say go ahead and retain this back up for five days. You can set that to whatever you want. Regarding days, you could also do a weekly backup point so I could say, okay, well, let’s also keep the retention period for weekly to 12 weeks. And then we could also do a monthly if we wanted to say, all right, be based on week or a specific day, but we’ll say week based week base will be first day of the month starting day Sunday. And then we could say do that for 60 months. And then finally you can do a yearly retention and that could be set. You could say, okay, well we’re going to retain a copy of the back up, you know, January 1st, and then we could do a Sunday and then keep it for up to ten years.

So, this is going to provide you with a lot of different options as far as like this backup going away. And the other thing that’s nice about this is Microsoft has the ability to archive it in cold storage, meaning it’s cheaper the longer out it goes, especially after it gets past 180 days, the longer out it goes, the cheaper the cost is as far as storing the backup.

So, now that I’ve done that, I just click to create. All right. And we’ve submitted to create our policy. So, now what we’ll do, let me just show you how we could use the policy if we want is we go to the menu button here. We can go to resource groups, we’ll go to storage account demo and we’ll go to a recovery services vault and back up. All right.

So, if we click on or I’m sorry, backup items, click on the backup items. If we go over here like Azure Files, I’ve got this one right here for images. And you can see the policy that it’s using, right? It’s using this daily policy right there. But I could drop that down and I could change to this policy if I want. And you can see all the items there. And so I can click change. And I’ve now officially changed the policy out. On the flip side of that, if you are scheduling a new backup so you can go down here to back up and let’s do Azure and we’re going to back up file share and we say back up. You can notice that the backup policy would be right here as well.

So, you could change out an existing backup with that policy or you could use that policy when you’re creating a new backup. All right. But all in all, that’s pretty much it as far as understanding the concepts of Azure backup policies.

70. Configure backup for Azure Virtual Machines using the built-in backup agent

I’d now like to go over the concepts of backing up Azure Virtual Machines now. I don’t actually have any virtual machines. I deleted my virtual machine, so I’m going to create a new virtual machine here.

So, I’m going to go to the menu button and I’m going to go to the virtual machines blade and I’m going to click to create a virtual machine. All right. In Azure Virtual Machine to kind of play around with here. And it asked me about a resource group. I’m just going to store this in my storage account demo resource group, and I’m just going to call this. Let’s call it vmbackupdemo. All right. That’s going to be the name of my virtual machine vmbackupdemo. All right, from there. US not going to do any availability zones, any of that stuff. Not really getting into the details of what all this stuff is. Hopefully by now you kind of know how to build a virtual machine. But I’m. I’m just going to choose the options. All right. Just going to go with the defaults. I’m going to set my admin account, which will be elpadmin, which is exam lab practice admin, and I’m going to set my password. All right. Forgot. There we go. Okay, so then RDP 3389. That’s fine on disk. I’m going to change it to standard storage. Standard HD. All right. And on management, I am going to set it to auto shut down at seven. All right. To feature, I like to have that way. I don’t leave this thing running by accident, so I’m going to click, review and create. All right. And once it validates, let’s see, it says I’m missing something.

So, let’s go back and find out what I’m missing. Let’s go back to basics here. Anything else that I didn’t select? Looks like I selected everything. Yep. I think I might have just been moving a little too fast. Because it probably just didn’t. Yeah, that’s what it was. I just moved a little too quick. It didn’t have time to properly validate all the options, so. All right, that’s good. We’re going to click Create and I’m going to go ahead and pause the recording while this is getting created. All right.

So, our virtual machine is set up now. We’ll click the menu button. I’m going to go to resource groups and I’m going to go to the storage account demo resource group that I’ve created. And as you can see, my virtual machine, all that’s in here, and I’m going to click on the Recovery Vault demo, Recovery Services vault that I have, and then I’m going to click back up. And as you can see, we have this is where your workload is in Azure. And then what do you want to back up? We’ll say Virtual Machine. So, we’ll click back up and then it says policy type, whether you’re doing a standard or enhanced and obviously you do want to kind of look at the cost of that. You can go to the Azure calculator and look at that. But back up policy. We have a default one here, which is going to do daily at 8:30. That’s fine. And then I want to add my virtual machine. Keep in mind, sometimes when you do this, if you move too fast, like if you create the virtual machine very quickly and then immediately jump into this, it may not show up immediately. You might have to give it a couple of minutes before your virtual machine appears here. I’ve got some older remnants of some older virtual machines that are still showing up as well that don’t actually exist anymore. And that’s just because of Azure and the way it does its metadata and all that. But this is the one that I care about, this vmbackupdemo.

So, I’m going go ahead and click Okay on that and it’s validated. All right. And then from there says, I’ve got the operating system only disk backing up because I didn’t actually select any data disk when I created this. So, I’ve just got the operating system disk, right. So, I’m going to go ahead and click to enable the backup. And it’s now submitting this for deployment. And so we’ll just go ahead and pause recording while that’s happening. All right.

So, it is done here so I can click go to Resource and it’ll take me over into my Recovery Services vault. If I click on Back Up, you will notice that or I’m sorry, backup items. You will notice that it says Azure Virtual machines. And you can see that this virtual machine backup is scheduled.

Now, it’s scheduled based on that policy. Of course, I can click here and I can say backup now. It’ll go and it’ll go ahead and say, all right, how long do you want to retain it? And then I’ll just go ahead and trigger this backup. Of course, this is going to take a while, but we are going to allow this to just go ahead and back up. But ultimately, as you can see, it’s actually very easy to perform a backup using a backup of an Azure VM using the Recovery Services vault. I feel like Microsoft has made this very-very intuitive, very straightforward, and you’re basically just using the existing software within Azure to back up these Azure VMs. And so hopefully you’ll find that’s not too hard to do and pretty easy to understand.

71. Recover a VM using temporary snapshots

Now, just like we can create what are called snapshots in virtualization environments. We can do the same thing in Azure. Although, I will say that nowadays in Hyper-V, they  call the snapshots of your disk. They call them checkpoints. But in most virtualization technologies, they refer to them as snapshots, including Azure.

So, here we are on portal.azure.com and we’re going to go to the menu button here. We’re going to click on virtual machines, and I have a virtual machine I’ve created called vmbackupdemo. I’m going to click on that and if I go over here to the disks blade, you’ll see I have an option up here. Once I click on the operating system disk, I have an option up here called Create a Snapshot.

So, I’m going to create a snapshot. It’s going to bring me into this, create a snapshot Wizard resource wizard, and then give it a name. It’s going to call this OSDiskSnapshot. That’ll be the name of the snapshot. And it says, “Do you want this to be a make a full read only copy of the selected disk?” Basically, as a backup, you want to make it incremental save on storage calls by making a partial disk based on the difference between the last snapshot. So, that’s more of a traditional sort of checkpoint scenario with Hyper-V, where if you do that. It will make the original disk read only, and then the incremental disk will store all of your new changes.

So, I am going to go full because I want to do a full basically a full backup snapshot of the disk. And then from there, don’t want to do storage, redundancy and all that. I’m just going to do standard HDD, Save cost. You can also utilize encryption platform based, which is Microsoft’s manage encryption. You can allow public connectivity to the snapshot if you want. Not really getting into all that right now, but I’m going to click Review and create, and then we’re going to click to create the snapshot. All right. So, I’ll go ahead and pose a recording while this is happening. All right.

So, our snapshot is created. We can click go to Resource and we can. See the snapshot, but how do we use the snapshot? So if we go to the menu button here, we go to all services. We can type the word disks and you’ll see this option right here, this resource called disk. You’re going to click that and you can see our existing disk. That is the actual disk right now that our virtual machine is using.

Now, what we can do is click to Create a new disk. All right. We’ll choose our storageacctdemo resource group, which is where our VM and all that stored. I’m going to give this a name. I’m going to call this disk_created_from_snapshot. All right. Because, you know, I’ve come up with the most original names. All right. And then from there, we’re going to do source type is going to be snapshot. And we should be able to drop this down. There it is, the OSDiskSnapshot. There it is right there. So, we’ve got that. And we can choose the storage tier we want and all that fun stuff here. Choose which storage tier, size and gigabytes. I’m going to go down to 128. Click Okay. And then we’re going to click Reviewing create. Know and create and we’re going to go ahead and palls this wall that’s happening. All right.

Now, let that is done. I can click go to resource and you can see the virtual disk. Here is virtual snapshot disk that’s been created. And if I click the menu button, I can go to virtual machines, click on the virtual machine, go to disks. And right up here, there is an option that says swap OSDisk, right? So if I click that, I have an option for pulling this snapshot disk in and it says, All right, you want to confirm that you want to swap the OSDisk for the VM for this VM by entering the name of the VM. So, I’m just going to copy that name. We’re going to paste that in. We’re going to click Okay. It’s going to stop the VM now and it’s going to swap out that disk. So, we’ll let that happen and I’ll pause recording while that’s happening. All right.

Now, as you can see, and I did have to refresh my web browser for this to show up, but there is the disk that is now being used. All right. And you can see that if I wanted to go back to that other disk, I could pretty easily. But the virtual machine is now officially got the new disk in it. And I could start that virtual machine right back up if I want. And we are now good to go. We’ve got our we’ve now recovered our virtual hard disk from a snapshot.

72. Recover VMs to new Azure Virtual Machines

So, what if you had a situation where you needed to build a whole new VM from an existing backup of VM? So, Azure actually makes this pretty easy for you to do. And I’d like to show you how we can do that right now.

Here we are on portal.azure.com. We can go to the menu button and go to resource groups and we got a storage account demo resource group here and I have a recovery services vault called Recovery Vault Demo, which I’ve backed up a VM into that. And if I go to backup items, I’ve got this option here, Azure Virtual machines, and you can see the backup right here.

So, if I click to View the details of that, I’ve got an option called Restore VM and I can choose. Once I do that, I can say, okay, select the restore point, I can choose the backup and click Okay. And then it says, “Do you want to create a new or replace existing?” So, all I got to do there is click Restore type. I would say create a new VM. Give it a name. I’m going to call this new VM from actually, let’s use some capitalization, new VM from backup. All right. We’ll call it that SubscriptionResourceGroupStorageAcctDemo. A virtual network will just use the same virtual network that the other one, there is tied to subnet and staging location. So, staging location, this elpstorageacctdemo, that’s going to be our storage account, that’s the staging location where it’s going to store everything while this is all happening. So, we’re going to go ahead now and click Restore. All right. And it’s now validating. And I’ll go ahead and polls all this while that’s happening. Okay. That’s done. It should only take about 5 minutes or so. Once that is done, I should now be able to just click the menu button. Go to virtual machines. And we should have that new virtual machine already up and running here in our list. And there it is. So, new VM from back up is listed there. We can click on it. And we can see that it is officially up and running. It is started. All right.

So, as you can see, it’s pretty easy to create a new VM from an existing backup of a VM.

73. Restore a VM

Performing a restoration of a VM is actually very easy. I’m not creating a new VM. In this case, I would be just restoring over the top of an existing one. So, to do that, all I got to do is go to portal.azure.com. I’m going to click the menu button.

First thing I’m going to do is just shut the VM down. So, we’ll go over here to the original VM, which is called VM Backup Demo, and I’m just going to tell it to stop. All right. So we’ll just stop it. All right. And I’m just going to pause the recording while that’s happening.

Now, what I’m going to do is I’m going to go to the Recovery services vault. So, I’m just going to go back over here to my resource groups. And we will go to the recovery services vault that we have right here. We’ll go to backup items. We’re going to click on virtual machine backups and view details and we’ll click to restore the VM. We’ll choose our backup that we can restore. And we’re going to choose, replace existing. Our storage account will be the staging location. Basically, that’s where our data will be stored while it’s restoring. And we’re going to go ahead and click Restore. All right. At that point, it’s going to do the validation and all that, and we’ll go ahead and pause recording while this is happening. All right. It doesn’t take very long. I’d say you give it just a couple of minutes or so and it looks like it’s been it’s done.

So, we’re going to go to the menu button. We’re going to go to virtual machines and we’re going to go to VM backup demo. And it’s we’re now going to click Start. And the virtual machine should be able to start up, no problem. And that is how you can very easily restore a virtual machine using the Azure backup services.