is there a way to export Azure Database for MySQL server to a blob or a container ? my main goal is to keep the backup for over 35 days in blob/container and still be able to restore it after?
i want to be able to save backups in the cloud and with azure tools , cli/power shell/ job so that i want need to do so on my own in common tools (mysqldump etc...)
- 121
2 Answers
You have built-in backup in Azure Database for MySQL https://docs.microsoft.com/en-us/azure/mysql/howto-restore-server-portal
But if you really want export to Azure Storage then I would recommend Data Factory.
Here is some documentation on connection Data factory and Azure MySQL. https://docs.microsoft.com/en-us/azure/data-factory/connector-azure-database-for-MySQL
You can then either run it on schedule or trigger it with .Net or Python SKD , REST api or Powershell.
- 725
As of May 2024, Azure Portal now has a button to let you Export a MySQL backup to an Azure Storage account:
Once you click on the Export button, you get a spartan UI for specifying the Storage Account and Container and that's it:
After the export completes (less than 2 minutes) you'll end up with a few hundred new files (or more) in your storage account, like so:
Now obviously this isn't a mysqldump output consisting of a single giant .sql file - and I'll admit I have no idea how I'm supposed to mount or restore this backup...
- 2,309


