Another excellent service of Azure SQL database backup is the Recovery Service Vault resource. To create a recovery service vault resource, you need to assign a name to your Azure Subscription, Resource Group, and Location.Â You may choose to display the name in your dashboard by simply clicking the "Pin to Dashboard" option.Â After that, click "Create" and viola- you have a new Recovery Service vault resource.Â Note, you will need to make sure that your Recovery Service vault is made within the same Azure subscription as your SQL Azure server.
Configure Your Recovery Service Vault
Click the "Configure" button, and then click the "Recovery Service Vault," and find the Recovery Service vault you created earlier.Â You may now create a new long-term retention policy.Â This Azure SQL database backup feature requires that you enter your name and choose how long you'd like to set your long-term retention period for.Â Next, click "Ok," and then go back to the prior screen to save your long-term retention policy.Â Â
Now, wait.Â After 1-2 hours, you can check the Activity log and monitor if your Recovery Service vault is backing up your database(s) correctly.Â Please be patient.Â It can take longer than you'd expect for progress to show.Â If it's working correctly, you will be able to see Write operations.Â This means that your backups are being stored in your new Recovery Service Vault.Â Â
Restore a Deleted Database
What happens if you accidentally delete a database?Â Is it gone forever?Â No.Â The only time you can't restore a deleted database is if the database was deleted before you created your backup retention policy.Â Aside from that, recovering a deleted database is quite simple.Â First, you need to log in to your Azure portal and select the Azure SQL server that stored your deleted database.Â Click "Deleted Databases."Â
In the right pane, you will be able to choose the name of the deleted database.Â Select the deleted database you wish to restore.Â Just select a new name for the deleted database and click "Ok."Â Your database restoration will begin.Â The Azure SQL database backup service will give you a confirmation when the deleted database has been restored.Â See!Â It is that simple.