Hello All,
I'm looking to try and automate database backups of our databases on our managed instance. Since these databases are on an Azure MI, from what I understand we cannot back these databases using the .BAK option (Tasks > Backup) and we must use the .BACPAC option (Tasks > Export Data-tier Application).
Is there a way we can automate the backup process and have the end result file uploaded to a storage container? Otherwise, how would you best approach obtaining database backups of Azure SQL databases?
I am aware of options within the Azure portal that we can configure such as retention policies per database, but it would be ideal for my company to have our backups in a container that's easily accessible for restoration and/or testing purposes.
Here's what I am doing today to get a database backup:
- Restore a copy of the database I wish to backup via the Azure portal
- Drop specific security users from the database that cause the bacpac process to fail. We have allowed Azure Active Directory authentication via Groups and these Groups must be dropped from the copied database in order for the process to succeed.
- Export the copied database
- Delete the copied database
Thanks! Any help or guidance would be greatly appreciated.