During this lesson you can learn how to protect and configure long-term Azure SQL Database backups that can be used to retain your data for up to ten years.
- [Instructor] The next backup type that I'm going to show you is used to back up your Azure SQL databases. Now for some of you you may be thinking, wait, you told us in previous courses that Azure SQL databases had automatic backups. And you would be correct. But remember, the longest term retention period for Azure SQL databases is 35 days. Long-term backups for SQL allow you to back up weekly for up to 10 years.
Let's go ahead and show you how we configure these. Now before we jump right in I'd like to point out what I already have set up here. In this resource group which I just called long-term SQL, I have a SQL server, a SQL database, and I have already configured the recovery services vault. And that's something to keep in mind when you're using the long-term backup, you cannot create it on the fly as you can do in some of the other backup solutions. Now we do want to back up the database so we'd think that we'd have to pop into the database, and we actually don't.
We actually have to do this at the server level. So I'm going to go ahead and open the blade for our SQL server, which I called long-term server. I know, not very original. And now what you need to do is scroll down under settings until you find long-term backup retention. And you'll notice that this is in preview at this point in time. And because it is in preview it may not be available in all regions. Therefore, always double check the Azure documentation. I'm going to go ahead and select the database.
And you'll notice once the database has been selected I can go ahead and select configure. Now I can go ahead and choose the recovery services vault that I have already configured for this demonstration. You'll notice we do not have an option here to create one on the fly. This must be created in advance. I have one here that is accessible. I'm going to go ahead and just click on select. When I created the recovery service vault I didn't create any policies.
If I did I could go ahead and select existing and then select a policy. But here I'm going to go ahead and create it on the fly. We can go ahead and enter our policy name. And then how long do we want to retain our backups for. And let's say in this case I'm going to retain them for nine months, and that's all there is to it. You can go ahead, click OK. And once you click save, that policy will then be applied to that database or all the databases that you have selected here.
Go ahead, click OK. The long-term backup will now associate the backups to that service vault that you created, and your databases will now be backed up. Now one thing I do want to mention here, notice this line. Once configured backups show up in the vault within the next seven days. Please keep this statement in mind when you're planning your long-term disaster recovery strategy. If you did need to recover your backups within that seven days you could use the automatic backups that are already provided with Azure SQL databases.
- Creating a Recovery Services vault for Azure Backup
- Protecting virtual machines, files and folders, databases, workloads, and file shares
- Restoring virtual machines, files and folders, databases, workloads, and file shares
- Azure Site Recovery scenarios
- Running failover and failback tests
- Replicating an Azure virtual machine